Features
- In an Obsidian vault, when you open or switch to a
.mdfile, the plugin automatically scans unlabeled fenced code blocks in the current note. - If a code block looks like Python, it automatically changes the opening fence to
```python. - You can assign a hotkey so that when your cursor is inside a code block, pressing that hotkey automatically labels and renders that code block as Python.
Hotkey setup
- Open Obsidian -> Settings -> Hotkeys.
- Search for
Auto label current code block as Python when it looks like Python. - Bind your preferred hotkey to that command.
Install into Obsidian
- Open your vault folder.
- Copy the Required files into
.obsidian/plugins/obsidian-auto-python/. - Required files included:
main.jsmanifest.json
- In Obsidian, go to Settings -> Community plugins.
- Turn off Restricted mode.
- Enable
Auto Python Fence.
Development
- Install dependencies:
npm install - Build:
npm run build - Watch:
npm run dev - Test:
npm run test:detector