An Obsidian plugin that provides commands for bulk enabling/disabling of plugins and CSS Snippets

Overview

⚔️ Divide & Conquer

An Obsidian plugin that provides commands for bulk enabling/disabling of plugins and CSS Snippets. Useful for debugging when you have many plugins or CSS snippets.

Table of Contents

How this helps with Debugging

You have a problem with Obsidian and have confirmed that the issue goes away when enabling safe mode. Now, you have to narrow down which plugin misbehaves. The most efficient method for doing so is called "bisecting", meaning that you disable half of the plugins, and depending on whether the issue still occurs or not, you can rule out one half of plugins.

Even though that process is the quickest method of finding the culprit-plugin, it is still quite cumbersome for power users who have 40, 50 or more plugins. Divide & Conquer provides some useful commands for bulk disabling/enabling of plugins, to make the power user's life easier.

Commands Added

  • Disable half of the enabled plugins
  • Enable half of the disabled plugins
  • Disable all plugins
  • Enable all plugins
  • Toggle all plugins (Disable enabled plugins & enable disabled ones)
  • Count enabled and disabled plugins

(Note that to be able to fulfill its duty, this plugin will never disable itself. The Hot Reload Plugin will also never be disabled, to avoid interference for developers.)

Conquer CSS Snippets

You can also divide and conquer your CSS snippets, the commands and the mechanics are exactly the same.

Installation

The plugin is available via Obsidian's Community Plugin Browser: SettingsCommunity PluginsBrowse → Search for "Divide & Conquer"

Contribute

Please use the .eslintrc configuration located in the repository and run eslint before doing a pull request, and please do not use prettier. 🙂

# Run eslint fixing most common mistakes
eslint --fix *.ts

About the Developer

In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch!

Profiles

Donate

Buy Me a Coffee at ko-fi.com

Comments
  • Feature Request: all plug-ins be closed

    Feature Request: all plug-ins be closed

    Feature Requested

    After the update, all plug-ins cannot be closed uniformly, and it becomes complicated to achieve this effect

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement 
    opened by chenxin0397 10
  • Feature Request: exclusions, back-tracking, and appearance

    Feature Request: exclusions, back-tracking, and appearance

    Feature Requested

    First, just want to say I really appreciate this plugin! I think it would be even better if you could: 1: select plugins to exclude in the settings menu (e.g. I'm confident that plugins like Git and Sliding Panes will pretty much never be a problem so I don't ever want to disable them) 2: use the same functionality available for plugins on CSS snippets in the appearance tab 3: back-track... meaning several things:

    • I just found the problem plugin, I'd like to re-enable all of the plugins that were active when I started (users often have disabled plugins installed, it's a chore to figure out which one's weren't enabled)
    • I'm several levels deep and the problem just went away. That means the problem is in the complement of the current set from the last set. I definitely wasn't keeping track of all the plugins that were just disabled so I need to enable just the ones that were just disabled

    There's a few ways do do that, and I think a few commands could replace existing ones*

    • save and recall commands.
      1. a simple implementation would be to just save the current state and recall that exact state, that could work ok with existing commands, but you run into the issue of either not being able to back-track, or back-tracking overwriting your original list of plugins
      2. Potentially you could instead have a stack of sets, with bisect/un-bisect commands
    • The second method above is better in my opinion, as that would make it simple to have a "re-bisect" command which does n un-bisect followed by the inverse bisection

    with those three commands, a user can: bisect, bisect (problem goes away), re-bisect (or inverse bisect, idk what it should be called), bisect, bisect (found problem), un-bisect, un-bisect, un-bisect, un-bisect

    Things to note:

    • un-bisecting the top level could either turn on all plugins (retaining history so re-bisecting goes back to the original list) or do nothing
    • manually enabling/disabling plugins could either reset the history, or just add/remove that one plugin from the previous bisections

    * Currently you can "disable half of enabled plugins", "enable half of disabled plugins", and "toggle all plugins" but those don't work well if I'm levels deep. I could have plugins [1,2,3,4,5,6], with [0,7,8] already disabled and 5 being the problem plugin. Disable half -> [1,2,3], problem goes away, toggle -> [0,4,5,6,7,8], disable -> [0,4,5], disable -> [0,4], problem goes away, toggle -> [1,2,3,5,6,7,8]... and that problem will repeat itself even if you use enable half instead of toggle. This is hard enough to keep track of on a small example and much harder with 50+ plugins.

    Bisect, un-bisect, re-bisect replace those three commands, and also get rid of the need for "enable all plugins" as un-bisecting the top level would do the same thing. Personally I also don't think there's a need for "disable all plugins" considering you can just turn on safe mode, and I don't really understand the point of the "count" command.

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement help wanted 
    opened by geoffreysflaminglasersword 9
  • Feature

    Feature

    @chrisgrieser I've added some UI buttons and colorization to the community plugins tab. I'll have to do some cleanup and make everything work with snippets but if you could just try out the functionality and let me know of any bugs you find it'd help

    opened by geoffreysflaminglasersword 5
  • [Bug/Minor]: New Plugin Tool Items Disappear After Checking for Updates

    [Bug/Minor]: New Plugin Tool Items Disappear After Checking for Updates

    Bug Description

    The new buttons added in the "Community Plugins" tab disappear after you "check for updates".

    Relevant Screenshot

    Initially:

    image

    Then:

    image

    To Reproduce

    1. Open the "Community Plugins" tab with D&C enabled.
    2. Hit "Check for Updates".
    3. The new buttons added will disappear.

    Obsidian Version

    1.0.4

    Which editor are you using?

    • [X] New Editor
    • [ ] Legacy Editor

    Checklist

    • [X] I updated to the latest version of the plugin.
    bug 
    opened by iamrecursion 2
  • Re-create `Count Plugins` command

    Re-create `Count Plugins` command

    followup from #2

    Bisect, un-bisect, re-bisect replace those three commands, and also get rid of the need for "enable all plugins" as un-bisecting the top level would do the same thing. Personally I also don't think there's a need for "disable all plugins" considering you can just turn on safe mode, and I don't really understand the point of the "count" command.

    @geoffreysflaminglasersword The purpose of disabling all instead of safe mode is that you can afterwards turn on a single plugin manually, to test things with all plugins except that one plugin disabled. Safe Mode doesn't help you here, since it turns of everything, and then recreates the previous state. that situation also makes enabling all plugins useful when you are finished.

    However, with your new settings for filtering certain plugins, those two are probably obsolete and unnecessary now.


    However, I think the counting of plugins should indeed be re-added. It's a minor thing, but it is useful to keep track of how many plugins are currently enabled/disabled, e.g. when you are interrupted while bisecting.

    enhancement good first issue 
    opened by chrisgrieser 2
  • Feature Request: Ability to Track Plugins that are

    Feature Request: Ability to Track Plugins that are "Safe"

    Feature Requested

    Requesting a way to print currently enabled plugin list or mark plugins as safe, because you don't know which plugin you enabled is the buggy plugin?

    I can disable all, enable half (and no bug) - then want to mark that half as safe plugins,

    then continue on to enable half of disabled then if bug, mark that half as potential issues and only enable those - then narrow down by disabling them and switching between those

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement 
    opened by Caffa 1
  • Feature Request: finer user control

    Feature Request: finer user control

    Feature Requested

    Specific functions I'd like to see are:

    • User can create presets that specify on/off/unchanged plugins;
    • User can create a function to mass toggle user-specified plugins;
      • Mass toggle has options always toggle, toggle if on, toggle if off.

    Something similar has been suggested in #2 and not implemented, but the issue was closed, so I'm bringing it up again (hope you don't mind it!).

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement 
    opened by firinael 1
  • Feature Request: Remember which plugins are enable

    Feature Request: Remember which plugins are enable

    Feature Requested

    This will help you turn on the only ones that you want quicker

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement 
    opened by ooker777 0
  • [Bug]: Typo in

    [Bug]: Typo in "Toggle all snippets"

    Bug Description

    Hey, while I was debugging something, I saw that the "Toggle all snippets" command is wrongly named "Toggle all plugins" (see screenshot). :eyes: It has the correct description, so it's probably just left over from a copy/paste.

    Thanks for making this plugin! It's helped me trace back some weird issues.

    Relevant Screenshot

    grafik

    To Reproduce

    1. Open command palette
    2. Search for "divide conquer toggle"

    Obsidian Version

    0.14.6

    Which editor are you using?

    • [X] New Editor
    • [ ] Legacy Editor

    Checklist

    • [X] I updated to the latest version of the plugin.
    bug 
    opened by lguenth 0
  • Maybe suggest closing and re-opening notes after each change in plugins?

    Maybe suggest closing and re-opening notes after each change in plugins?

    Feature Requested

    Hi,

    Having once again been bitten by Obsidian sometimes needing to re-open notes for changes to take effect, I wonder whether this might affect any users of this plugin?

    I'm basing it on turning off the Backlinks plugin, but the backlinks not being removed - and that's a core plugin.

    So I don't know if it affects any community plugins...

    But just in case, I wanted to mention it here, in case it might save someone else time trying to test changes in behaviour, and their tests being invalided if they don't know the pitfall of needing to re-open notes sometimes.

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement 
    opened by claremacrae 0
  • Reload after CSS snippet bisection when on Linux

    Reload after CSS snippet bisection when on Linux

    On Linux, Obsidian does not hot reload css, so when bisecting css snippets, the Divide and Conquer should reload Obsidian after every command.

    can be done by adding a if-condition using the Platform API form Obsidian.

    enhancement good first issue 
    opened by chrisgrieser 0
  • [Bug]: Code error leads to bisection not working

    [Bug]: Code error leads to bisection not working

    Bug Description

    When I run bisect, nothing happens.

    I checked the console and this error appeared:

    plugin:obsidian-divide-and-conquer:1297
    Uncaught (in promise) TypeError: this.mode2Refresh.get(...) is not a function
    at divideAndConquer.eval (plugin:obsidian-divide-and-conquer:1297:136)
    eval @ plugin:obsidian-divide-and-conquer:1297
    

    Relevant Screenshot

    No response

    To Reproduce

    No response

    Obsidian Version

    1.1.8 (installer version 0.14.15)

    Which editor are you using?

    • [X] New Editor
    • [ ] Legacy Editor

    Checklist

    • [X] I updated to the latest version of the plugin.
    bug 
    opened by danrthompson 0
  • Better instructions

    Better instructions

    Feature Requested

    I have no idea how to use this. The buttons don’t do what I expect them to do, and (on mobile) are unlabeled. Could you provide some instructions on how to use this plugin?

    Relevant Screenshot

    No response

    Checklist

    • [X] The feature would be useful to more users than just me.
    enhancement 
    opened by Calorion 0
  • [Bug]: Button doesn't appear if Obsidian is not in english

    [Bug]: Button doesn't appear if Obsidian is not in english

    Bug Description

    Button doesn't appear either in community plugin or CSS snippets, if Obsidian is set in another language than English.

    Relevant Screenshot

    image

    To Reproduce

    Note : Obsidian must be in any language different than english. For example, my bug appear in French.

    1. Enable the plugin
    2. Try to refresh
    3. See console

    Obsidian Version

    1.0.3

    Which editor are you using?

    • [X] New Editor
    • [ ] Legacy Editor

    Checklist

    • [X] I updated to the latest version of the plugin.
    bug 
    opened by Lisandra-dev 0
Releases(1.0.0)
Owner
pseudometa
Researcher in Sociology who also codes some small utilities in his leisure time.
pseudometa
AWS SAM project that adds the snippets from serverlessland.com/snippets as saved queries in CloudWatch Logs Insights

cw-logs-insights-snippets Serverlessland.com/snippets hosts a growing number of community provided snippets. Many of these are useful CloudWatch Logs

Lars Jacobsson 12 Nov 8, 2022
The iofod SDK provides developers with the ability to interact with the main iofod interface within the Web worker, enabling rapid development of iofod extensions through the SDK.

iofod-sdk English | 简体中文 The iofod SDK provides developers with the ability to interact with the main iofod interface within the Web worker, enabling

iofod, Inc. 47 Oct 17, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

Copy Search URL This plugin adds a button to Obsidian's search view. Clicking it will copy the Obsidian URL for the current search to the clipboard. T

Carlo Zottmann 6 Dec 26, 2022
Export AWS SSM Parameter Store values in bulk to .env files

aws-parameter-bulk Utility to read parameters from AWS Systems Manager (SSM) Parameter Store in bulk and output them in environment-file or json forma

Adam Malik 18 Oct 18, 2022
The repos includes script for uploading bulk files in a directory to ipfs using nft.storage

Uploading Foloder to IPFS using nft.storage This repository includes script for uploading bulk files in a directory to ipfs using nft.storage Acknowle

Dapp Composer 22 Dec 17, 2022
This repo contains the templates used in my automated obsidian weekly review video and also an accompanying vault with the folder structure expected and plugins

This repo contains the templates used in my automated obsidian weekly review video and also an accompanying vault with the folder structure expected and plugins (periodic note settings etc)

Pamela Wang 53 Dec 21, 2022
Obsidian plugin to support a sequenced of keyboard shortcuts to run commands.

Sequence Shortcuts (Obsidian plugin) This plugin allows you to use a sequences of chords for shortcuts instead of single chords. Creating a hotkey You

Ruan Moolman 23 Dec 17, 2022
This plugin for Obsidian adds commands for increasing/decreasing the blockquote level of the current line or selection(s).

Blockquote Levels This plugin for Obsidian adds commands for increasing/decreasing the blockquote level of the current line or selection(s). Usage The

Carlo Zottmann 15 Dec 19, 2022
All terminal commands in one place (you can Contribute to it by putting latest commands and adding Readme)

Terminal-Commands All basic terminal commands in one place Show some ❤ by some repositories You can contribute to this readme If you to contribute wit

Shehzad Iqbal 7 Dec 15, 2022
Download Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.

notion-pull notion-pull lets you use Notion as your editor for markdown-based static site generators like Docusaurus. Using Notion instead of raw mark

SIL LSDev 46 Jan 7, 2023
This is a plugin for Obsidian (https://obsidian.md). Can open document with `.html` and `.htm` file extensions.

Obsidian HTML reader Plugin This is a plugin for Obsidian (https://obsidian.md). Can open document with .html and .htm file extensions. Obsidian HTML

null 37 Dec 27, 2022
An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor.

Obsidian Excel to Markdown Table An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor. Demo You can paste the copied Excel d

Ganessh Kumar 108 Jan 4, 2023
An Obsidian plugin that lets you browse the web within Obsidian.

Obsidian Web Browser An Obsidian plugin that allows you to browse the web within Obsidian using v1.0 tabs. The core functionality of the plugin, rende

Dion Tryban 102 Dec 28, 2022
Lightweight (zero dependencies) library for enabling cross document web messaging on top of the MessageChannel API.

Lightweight (zero dependencies) library for enabling cross document web messaging on top of the MessageChannel API.

LironH 4 Jul 15, 2022
ClientDB is an open source in-memory database for enabling real-time web apps.

ClientDB ClientDB is an open source in-memory database for enabling real-time web apps. Build fast, scalable apps that feel silky smooth for users. In

Acapela 540 Dec 24, 2022
ClientDB is an open source in-memory database for enabling real-time web apps.

ClientDB ClientDB is an open-source in-memory database for enabling real-time web apps. Build fast, scalable apps that feel silky smooth for users. In

null 436 Aug 27, 2022