A fast, modern, cross-platform modal text editor
Project description
Peovim
A fast, modern, cross-platform modal text editor written in Python — heavily inspired by Neovim with a clean plugin API designed for extensibility.
I've been a Vim/Neovim editor Nerd for a long time and this project grew out of the question:
- "Can a basic Vim/Neovim style modal editor be created entirely with Python?"
Achieving basic functionality was surprisingly straightforward, but then I immediately had these follow up questions:
- Can I start adding all the plugins/features that I use in Neovim?
- How slow will this be with this built using Python?
It turns out that most of the things that I wanted were relatively simple to add, especially with AI assistance. Additional features should be easy to add via the plugin API.
An optional Cython based renderer was added as a performance improvement.
Being written entirely in Python this editor is very easy to modify or create plugins for (especially with AI tools). If you are a modal editor nerd, fork this project and create your own hyper customized modal editor!.
Features
- Modal editing — Normal, Insert, Visual, and Visual Block modes with Vim-compatible bindings
- LSP support — go to definition, hover, references, rename, code actions, completions, diagnostics, inlay hints
- Syntax highlighting — tree-sitter powered, covering Python, JS/TS, Rust, Go, C/C++, Lua, and more
- Side/Bottom Panels — file explorer, document outline, diagnostics, references, workspace symbols, git status
- Git integration — status panel with staging/unstaging/discarding, branch management, diff view, log browser
- Fuzzy finder — file picker, buffer picker, live grep, command palette
- Session management — autosave/restore with per-project state
- Flash jump — 2-char jump labels (
sin normal mode) - Which-key — similar to Folke's key hint overlay Neovim plugin (my personal favorite Neovim plugin!)
- Marker groups — persistent bookmarks with annotations and gutter signs
- Local history — per-file timestamped save history
- Copilot — support for Copilot autocompletions.
- Plugin API — plain Python plugins with event hooks, keymaps, commands, decorations, and sidebar panels
Features more unique to my (Verilog, Python) workflow
- Verilog LSP — a custom LSP that allows heirarchy collapse/extract, signal tracing, and more features using verilog-tools
Requirements
- Python 3.13+
- uv package manager
Installation
From source (development)
git clone https://github.com/chiplukes/peovim
cd peovim
uv sync
As a global tool
uv tool install .
After install, the peovim command is available on your PATH:
peovim # open empty buffer
peovim file.py # open a file
Updating
Pull the latest changes, then reinstall:
git pull
uv tool install --reinstall .
Running (development)
uv run peovim # open empty buffer
uv run peovim file.py # open a file
Configuration
Create init.py at the platform config path:
| Platform | Path |
|---|---|
| Windows | %APPDATA%\peovim\init.py |
| Linux | ~/.config/peovim/init.py |
| macOS | ~/Library/Application Support/peovim/init.py |
The config file is plain Python. Example:
# init.py
plugins.load("peovim.plugins.lsp")
plugins.load("peovim.plugins.picker")
plugins.load("peovim.plugins.explorer")
plugins.load("peovim.plugins.outline")
plugins.load("peovim.plugins.gitsigns")
plugins.load("peovim.plugins.diagnostics_panel")
plugins.load("peovim.plugins.formatter")
plugins.load("peovim.plugins.local_history")
# Space as leader (default is backslash)
options.set("leader", " ")
options.set("number", True)
options.set("relativenumber", True)
options.set("tabstop", 4)
# Custom keybindings
keymap.nmap("<leader>w", ":w<CR>", desc="Save file")
Project-local config at .peovim/init.py is also supported — the editor prompts for trust on first encounter.
A more thorough init.py can be found here:
Key Bindings
Navigation
| Key | Action |
|---|---|
<leader>ff |
Fuzzy find files |
<leader>fg |
Live grep |
<leader>fb |
Open buffers |
<leader>sw |
Grep word under cursor |
<C-o> / <C-i> |
Jump back / forward |
gf |
Go to file under cursor |
s |
Flash jump (type 2 chars) |
LSP
| Key | Action |
|---|---|
gd |
Go to definition |
K |
Hover documentation |
<leader>gr |
References sidebar |
<leader>rn |
Rename symbol |
<leader>ca |
Code actions |
]d / [d |
Next / previous diagnostic |
<leader>o |
Document outline sidebar |
<leader>cD |
Diagnostics sidebar |
<leader>csw |
Workspace symbols sidebar |
Sidebar
| Key | Action |
|---|---|
<leader>e |
Toggle file explorer |
<leader>gs |
Toggle git panel |
<A-h> |
Focus sidebar from editor |
<A-l> |
Return to editor from sidebar |
<A-j> / <A-k> |
Cycle sidebar panels |
<Esc> |
Hide sidebar |
Git Panel (when focused)
| Key | Action |
|---|---|
a |
Stage file |
u |
Unstage file |
x |
Discard changes |
d |
Diff file against HEAD |
l |
Git log browser |
P |
Push |
p |
Pull |
Editing
| Key | Action |
|---|---|
gcc |
Toggle comment |
ysiw{char} |
Surround inner word |
cs{old}{new} |
Change surrounding |
ds{char} |
Delete surrounding |
<leader>pr |
Paste from yank register |
ga (visual) |
Align on character |
See notes/keys.md for the full key binding reference.
Ex Commands
| Command | Description |
|---|---|
:w / :wq / :q |
Save / save+quit / quit |
:e <file> |
Open file |
:split / :vsplit |
Split window |
:LspInfo / :LspRestart |
LSP status / restart |
:format |
Format buffer |
:colorscheme <name> |
Switch theme (catppuccin, gruvbox, onedark) |
:Session / :SessionLoad |
Save / load session |
:GitLog |
Open git log browser |
:checkhealth |
Run health checks |
Press <Tab> in the command line to fuzzy-browse all available commands.
Themes
Built-in themes: catppuccin (default), gruvbox, onedark.
Switch with :colorscheme <name> or set in init.py:
options.set("colorscheme", "gruvbox")
Development
# Install dev dependencies
uv sync --extra dev
# Run tests
uv run pytest tests/ --tb=no -q
# Lint / format
uv run ruff check peovim/
uv run ruff format peovim/
Optional: native Cython renderer
A Cython-accelerated renderer is included for a ~4–25× speedup on the render path. It builds automatically if a C compiler is present (cl.exe on Windows, gcc/clang on Linux/macOS). The pure-Python fallback is used otherwise — the editor runs fine either way.
# Verify which renderer is active
uv run python -c "from peovim._native import HAS_NATIVE; print(HAS_NATIVE)"
Documentation
notes/getting_started.md— install, configuration, and getting startednotes/keys.md— complete key binding referencenotes/user_guide.md— day-to-day usage guidenotes/architecture.md— internals and architecturenotes/developer_guide.md— plugin API and contribution guide
Acknowledgments
I have spent an embarassing amount of time over the years "Configuring" Vim (and then Neovim). The plugin and editor developers are truly amazing and I strongly suggest spending time in that community to see all the creative and amazing things that are possible!
The following list was inspiration for this project:
- Neovim:
- flash.nvim — flash jump
- snacks.nvim — dashboard, notifications, indent guides
- gitsigns.nvim — git gutter and status
- mini.nvim — picker, surround, commentary
- blink.cmp — LSP completion
- conform.nvim — formatting
- which-key.nvim — key hint overlay
- todo-comments.nvim — TODO highlights
- persistence.nvim — session management
- nvim-lspconfig — LSP server configuration
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peovim-0.1.0.tar.gz.
File metadata
- Download URL: peovim-0.1.0.tar.gz
- Upload date:
- Size: 888.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c401f0904790f8bc8230ae09b85cd4109b18af3ec59872d2e3311e00d7a9848
|
|
| MD5 |
7dc389af1e772794d8f01b0ca188fdad
|
|
| BLAKE2b-256 |
29745bfe3b945008199dc81290884674d35bab7849012c4b0e4954b8c20ffc69
|
Provenance
The following attestation bundles were made for peovim-0.1.0.tar.gz:
Publisher:
publish.yml on chiplukes/peovim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peovim-0.1.0.tar.gz -
Subject digest:
3c401f0904790f8bc8230ae09b85cd4109b18af3ec59872d2e3311e00d7a9848 - Sigstore transparency entry: 1839937444
- Sigstore integration time:
-
Permalink:
chiplukes/peovim@58f2f387d7721e6a9862cbf7cb3ca13c8a087e93 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/chiplukes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@58f2f387d7721e6a9862cbf7cb3ca13c8a087e93 -
Trigger Event:
push
-
Statement type:
File details
Details for the file peovim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: peovim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 800.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4d76daffa943955c26308b9f4df32e7d5c9c07f135929609a65c8b713a72641
|
|
| MD5 |
f0a02476509b6fc7cfa144ad0b850b69
|
|
| BLAKE2b-256 |
54223363f3df9ee6ff31404ef3c15f83dcd16c2c982c60b401753c27a2c71d67
|
Provenance
The following attestation bundles were made for peovim-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on chiplukes/peovim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peovim-0.1.0-py3-none-any.whl -
Subject digest:
a4d76daffa943955c26308b9f4df32e7d5c9c07f135929609a65c8b713a72641 - Sigstore transparency entry: 1839937480
- Sigstore integration time:
-
Permalink:
chiplukes/peovim@58f2f387d7721e6a9862cbf7cb3ca13c8a087e93 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/chiplukes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@58f2f387d7721e6a9862cbf7cb3ca13c8a087e93 -
Trigger Event:
push
-
Statement type: