No description
Find a file
2021-08-09 09:45:37 -06:00
.github/workflows Update template entry to correct name. 2021-07-27 00:36:37 -06:00
src WIP: Experimenting with handling indentation in list items: lines 399-410 2021-08-09 09:45:37 -06:00
.gitignore Initial commit 2021-07-24 23:28:52 -06:00
.prettierrc.json Add use of editorCallback and prettier 2021-08-05 20:54:25 -06:00
LICENSE.md Create LICENSE.md 2021-07-31 13:23:57 -06:00
manifest.json Add use of editorCallback and prettier 2021-08-05 20:54:25 -06:00
package.json Add use of editorCallback and prettier 2021-08-05 20:54:25 -06:00
README.md Complete recursive rewrite. 2021-08-04 12:32:31 -06:00
rollup.config.js Initial commit 2021-07-24 23:28:52 -06:00
tsconfig.json Initial commit 2021-07-24 23:28:52 -06:00

Obsidian Multi-line Formatting Plugin

This plugin is designed to offer formatting over an entire selection, even if that selection has paragraph breaks in the middle! However, this plugin is new and has only had limited testing. I am grateful for your patience and your bug reports!

Usage

Select the text you want to format, and use the command Format, even over multiple lines (you can change this command name and what kind of formatting to apply in Settings). Be careful not to start but not end your selection in the middle of another type of paired formatting (e.g. bold, italics, highlighting, etc.) or vise versa. If no text is selected, the command will "toggle on" the formatting, so that what you type next will be formatted.

Settings

Two formatting styles exist by default. To add a new formatting style, scroll to the bottom of the settings pane (Multi-line Formatting Plugin Options) and click the Add formatting style button.

For each formatting style, you can enter the formatting you want to apply as Left and Right. You can change the Nickname of the command so that the name in the command palette better reflects the kind of formatting you choose.

If you want to be able to select large amounts of text but not apply your formatting style to headings in that selection you can toggle Skip Headings on.

You can delete formatting styles that you are not using by clicking the Delete this style button at the bottom of styles settings for any style.

Hotkeys

Like any other Obsidian commands, you can assign hotkeys to the formatting style commands generated by the Multi-line Formatting plugin in the Hotkeys options (separate from the Plugin Options), including reassigning the usual Strong/Bold (Ctrl + b) and Italics/Emphasis (Ctrl + i) hotkeys to their Multi-line Formatting commands.

Limitations

Again, this is an early version of this plugin which has had limited testing. Help me improve it by reporting any unexpected behaviour. However, note that currently code block sections are skipped, but code blocks embedded in list items or blockquotes are not formatted correctly.

Planned Features

  • Jump to formattable part of the line if you apply the command with an empty selection
  • Handle embedded code blocks

Bug reports and feature requests appreciated!

Please let me know how this plugin can be improved.

Acknowledgements

A huge thank you to lynchjames, whose Note Refactor Plugin formed the base for this plugin, and to THeK3nger for the Obsidian Plugin Template, and to roshanshariff for help debugging and refactoring!