README file from
GithubInsert Block Below
Insert math blocks and code fences below the current line in Obsidian, while preserving quote, callout, and list-aware indentation.
GitHub repository: homura144/obsidian-insert-block-below
Features
- Command palette commands:
Insert math block belowInsert code block below
- Preserves indentation for:
- blockquotes
- callouts
- unordered lists
- ordered lists with
1.and1)
- Auto trigger while typing:
$$$expands into a$$block below- ``` expands into a code block below
- Optional two-line code block mode so the cursor lands at the end of the opening ``` for immediate language input
Settings
Code block without blank line- Insert a two-line code block and place the cursor at the end of the opening ```.
- Auto trigger when typing ```
- Type ``` at the end of a line to expand into a code block below.
- Auto trigger when typing
$$$- Type
$$$at the end of a line to expand into a$$block below.
- Type
Trigger Rules
- Auto triggers only fire during real-time typing in the editor.
- The trigger sequence must be at the end of the current line, e.g.
- some text$$$ - Text before the trigger sequence is preserved.
- Auto triggers do not fire inside existing fenced code blocks.
- Empty special cases are supported:
|+ ` -> code block below$$|$+$-> math block below
Installation
Before this plugin is accepted into the community store, install it manually:
- Download
main.jsandmanifest.jsonfrom the latest GitHub release. - Create
.obsidian/plugins/obsidian-insert-block-below/in your vault. - Copy the release files into that folder.
- Reload Obsidian and enable
Insert Block Belowin community plugins.
After store acceptance, install it from the Obsidian community plugins browser.
Install With BRAT
You can also install the plugin with BRAT before it is available in the community store.
- Install and enable the
Obsidian42 - BRATplugin. - Open the BRAT command
BRAT: Add a beta plugin for testing. - Paste the repository URL:
https://github.com/homura144/obsidian-insert-block-below
- Confirm the plugin entry and let BRAT download the latest release.
- Enable
Insert Block Belowin community plugins if it is not enabled automatically.
BRAT installs from the GitHub repository, so the repository and release assets must exist first.
Development
npm install
npm test
npm run build
The built release asset is main.js.
Release Assets
Each GitHub release should upload:
main.jsmanifest.json
This plugin currently does not use styles.css.
License
Released under the MIT License.