-
Notifications
You must be signed in to change notification settings - Fork 0
Home
edgar edited this page Feb 25, 2026
·
3 revisions
A vim-style JSON editor built with Textual.
jvim brings the efficiency of vim keybindings to JSON editing in your terminal. It provides syntax highlighting, real-time validation, JSONPath search, embedded JSON editing, and a powerful diff viewer — all in a lightweight TUI.
- Vim-style modal editing — Normal, Insert, Command, and Search modes
- Syntax highlighting — JSON-aware colorization
- JSON validation — Real-time validation with error reporting
- JSONPath search — Search using JSONPath expressions with value filtering
- JSONL support — Edit JSON Lines files with smart formatting and record navigation
- Embedded JSON editing — Edit JSON strings within JSON with nested level support
-
Visual mode — Character-wise (
v) and line-wise (V) selection withd/y/coperators - Folding — Collapse/expand JSON blocks and long string values (60+ chars)
-
Bracket matching — Jump to matching brackets with
% -
Undo/Redo — Full undo history with dot-repeat (
.) -
Substitute — Vim-style
:s/old/new/gwith regex, range, JSONPath, and flags support -
Multi-file navigation — Open multiple files and switch with
:n,:N,:e# - Diff viewer — Side-by-side JSON comparison with scroll/fold/cursor sync
- Full keybindings reference
pip install jvim# Open a file
jvim data.json
# Open multiple files
jvim a.json b.json c.json
# Open in read-only mode
jvim -R data.json
# Create new file
jvim newfile.json
# Compare two JSON files
jvimdiff file1.json file2.jsonAlso available as jvi and jv shortcuts. The diff viewer is also available as jvd.
| Mode | Description | Enter | Exit |
|---|---|---|---|
| Normal | Navigation and commands | Esc |
— |
| Insert | Text editing |
i, a, o, etc. |
Esc |
| Command | Ex commands | : |
Enter or Esc
|
| Search | Find text/JSONPath |
/ or ?
|
Enter or Esc
|
| Visual | Selection |
v or V
|
Esc, d, y, c
|
| Page | Description |
|---|---|
| JSONL Support | JSON Lines handling, record navigation, floating header |
| JSONPath Search | JSONPath expressions, value filtering, smartcase, modifiers |
| Embedded JSON Editing | Editing nested JSON strings with multi-level stack |
| Substitute | Find-and-replace with regex, JSONPath, and JSONL support |
| Diff Viewer | Side-by-side comparison, hunk navigation, EJ diff |
| Keybindings | Complete keybinding reference for all modes |