Python Editor
approvedby Juan Miguel Dela Cruz
Browse and edit Python files with Lezer-powered structure, highlighting, search, and auto-save. - This plugin has not been manually reviewed by Obsidian staff.
↓ 121 downloadsUpdated 28d agoMIT
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+Fsearch andCtrl/Cmd+Hreplace shortcuts. - Automatic saving through Obsidian's
TextFileViewsave 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
npm install
npm run typecheck
npm run build
Copy main.js, manifest.json, and styles.css into:
<vault>/.obsidian/plugins/python-editor/
Then reload Obsidian and enable Python Editor.
Editor architecture
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
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.