# Python Editor Python Editor is an Obsidian plugin for viewing and editing `.py` and `.pyi` source files with CodeMirror 6. ## Features - CodeMirror 6 editor with line numbers and Python syntax highlighting. - Navigable code outline for classes, functions, methods, and the `__main__` entry point. - Configurable default outline position: right, left, or hidden. - Undo/redo, code folding, bracket matching, and Obsidian-styled find/replace. - Obsidian-compatible `Ctrl/Cmd+F` search and `Ctrl/Cmd+H` replace shortcuts. - Automatic saving through Obsidian's `TextFileView` save lifecycle. - Mobile-compatible implementation with no Node.js or Electron runtime APIs. - Python code is edited as text and is never executed by the plugin. ## Development ```bash npm install npm run typecheck npm run build ``` Copy `main.js`, `manifest.json`, and `styles.css` into: ```text /.obsidian/plugins/python-editor/ ``` Then reload Obsidian and enable **Python Editor**. ## Editor architecture ```text Python source -> CodeMirror 6 editor -> Python syntax highlighting and editing -> Obsidian TextFileView save lifecycle ``` The editor uses CodeMirror's `@codemirror/lang-python` language support. Python source is never executed by the plugin. ## License [MIT](LICENSE)