Skip to content

About

Auto label code block as Python when it looks like Python

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

obsidian-auto-python

English | 简体中文

Features

  • In an Obsidian vault, when you open or switch to a .md file, 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

  1. Open Obsidian -> Settings -> Hotkeys.
  2. Search for Auto label current code block as Python when it looks like Python.
  3. Bind your preferred hotkey to that command.

Install into Obsidian

  1. Open your vault folder.
  2. Copy the Required files into .obsidian/plugins/obsidian-auto-python/.
  3. Required files included:
    • main.js
    • manifest.json
  4. In Obsidian, go to Settings -> Community plugins.
  5. Turn off Restricted mode.
  6. Enable Auto Python Fence.

Development

  • Install dependencies: npm install
  • Build: npm run build
  • Watch: npm run dev
  • Test: npm run test:detector

About

Auto label code block as Python when it looks like Python

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages