Mode manager

approved

by dk949

Provide an easier way to manipulate reading/editing and preview/source mode

4 stars844 downloadsUpdated 1mo agoMIT
View on GitHub

Mode manager

This plugin adds dedicated commands to switch to specific modes (reading, source and live preview), rather than relying on the default toggle behaviour.

Commands

NameDescriptionID (for use in scripting)
Mode manager: Switch to readingSwitch to reading modemode-manager:switch-to-reading
Mode manager: Switch to live previewSwitch to live preview mode (edit with formatting preview)mode-manager:switch-to-live-preview
Mode manager: Switch to sourceSwitch to source only edit modemode-manager:switch-to-source
Mode manager: Switch to editSwitch to edit mode and maintain existing source or preview settingmode-manager:switch-to-edit
Mode manager: Switch to next modeCycle through modes in sequential order: reading, source, previewmode-manager:switch-to-next-mode

Special properties

You can use a special property (default-mode by default, can be changed in settings) to automatically switch to a specific mode when opening the file. Below is more about the available values.

Available values

The value of the special property must be one of:

  • edit
  • preview
  • source
  • reading

Any other value will be ignored and a notice will be shown.

[!NOTE] This is currently broken for daily notes opened on startup.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.