Skip to main content

Peovim

License: MIT Python 3.13+

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!.

Peovim demo

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 (s in 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 veriforge

Requirements

  • Python 3.13+
  • uv package manager

Installation

From source (development)

git clone https://github.com/chiplukes/peovim
cd peovim
uv sync
uvx pre-commit install   # activates lint/format hooks on every commit

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:

My Init.py

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
<leader>dw Diff file against working tree (selected revision in git history)
<leader>dp Diff commit against its first parent (HEAD in editor/explorer)
<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)

Expand Recent commits to browse the latest 30 commits and their changed files. On a commit file, Enter or d opens its diff against the first parent; <leader>dw compares that revision with the working file.

Key Action
a Stage file
u Unstage file
x Discard changes
d Diff status file against HEAD, or commit file against its parent
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

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:

Metadata

Release files for peovim 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peovim 0.3.8
File Size Uploaded Provenance
peovim-0.3.8.tar.gz 1.0 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for peovim 0.3.8
File Interpreter ABI Platform
peovim-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / peovim-0.3.8.tar.gz

Download URL peovim-0.3.8.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
b0287e6c7664521c37ae078f4fe8af20998b5c408125efe4330a4142c6e13f0a
BLAKE2b-256 checksum
How to use checksums
b914bfe7f656aaeb14a9cfaea68e77322ce32bf642e06f6f46a44fd763f51f24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / peovim-0.3.8-py3-none-any.whl

Download URL peovim-0.3.8-py3-none-any.whl
Size 887.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e01bb8885bcfcb5fa4f8a1117a6fff2773fd8b0dc9aca996dd9b7e17fab32e04
BLAKE2b-256 checksum
How to use checksums
255cad234509bba13ab78e7f271dea9ad26eb645a421305816cc8552c4496c10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for peovim 0.3.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for peovim-0.3.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page