A vim-like canvas editor for JSON Canvas files. Built with Tauri 2, SvelteKit, and Rust.
Canvim lets you create and edit .canvas files (the format used by Obsidian Canvas) using vim-style navigation and modal editing. Full mouse support is also included.
canvim [file.canvas]
Opens the given .canvas file (creates it if it doesn't exist).
- Keyboard-first -- navigate, create, move, resize, and connect nodes without touching the mouse
- Modal editing -- six vim-like modes: Normal, Insert, Visual, Move, Resize, and Connect
- JSON Canvas spec -- reads and writes standard
.canvasfiles compatible with Obsidian - Markdown rendering -- node text is rendered as markdown with syntax highlighting
- Search --
/to search node text, cycle through matches - Undo/redo -- full history with
uandCtrl+r - Yank/paste -- copy and paste nodes (with edges) using
yandp - Configurable -- colors, keybindings, and fonts via
~/.config/canvim/config.toml - Borderless window -- minimal chrome, maximum canvas
Default mode. Pan the viewport, select nodes/edges, and enter other modes.
Edit node text as markdown. Enter with i (on a node) or by adding a new node with a. Press Escape to return to Normal mode.
Rectangle selection. Press v to start a selection from the cursor position, then move with hjkl to grow/shrink the rectangle. Press Enter to select all enclosed nodes, or Escape to cancel.
Move selected nodes. Press m on a node or selection, then use hjkl to move in grid steps. The viewport follows the movement. Press Escape or Enter to confirm. Switch to Resize with r.
Resize selected nodes. Press r on a node or selection, then use hjkl to grow/shrink. Press r again to auto-fit height to content. Press Escape or Enter to confirm. Switch to Move with m.
Draw edges between nodes. Press c on a source node, navigate with hjkl to a target node, then Enter to create the edge. Escape to cancel.
| Key | Action |
|---|---|
h j k l |
Pan viewport |
a |
Add node at cursor |
Enter |
Select node/edge under cursor |
i |
Edit node under cursor |
d / Delete |
Delete node/edge (or selection) |
m |
Enter Move mode |
r |
Enter Resize mode |
c |
Enter Connect mode |
v |
Enter Visual mode |
V |
Deselect all |
y / Ctrl+c |
Yank (copy) node(s) |
p / Ctrl+v |
Paste |
u |
Undo |
Ctrl+r |
Redo |
/ / Ctrl+f |
Search |
1-6 |
Set color (red, orange, yellow, green, cyan, purple) |
0 |
Clear color |
+ / - |
Zoom in/out |
Tab / Shift+Tab |
Cycle through nodes |
Escape |
Deselect |
q |
Save and quit |
| Key | Action |
|---|---|
| type freely | Edit node text (markdown) |
Escape |
Return to Normal mode |
| Key | Action |
|---|---|
h j k l |
Expand/shrink selection rectangle |
Enter |
Select enclosed nodes |
Escape |
Cancel |
| Key | Action |
|---|---|
h j k l |
Move selected node(s) by grid step |
r |
Switch to Resize mode |
i |
Confirm and enter Insert mode |
Enter / Escape |
Confirm and exit |
| Key | Action |
|---|---|
h j k l |
Resize selected node(s) by grid step |
r |
Auto-fit height to content |
m |
Switch to Move mode |
i |
Confirm and enter Insert mode |
Enter / Escape |
Confirm and exit |
| Key | Action |
|---|---|
h j k l |
Pan to target node |
Enter |
Create edge to node under cursor |
Escape |
Cancel |
| Key | Action |
|---|---|
Tab / Shift+Tab |
Cycle through matches |
Enter |
Confirm search (select match) |
n / N |
Next/previous match (after confirm) |
Escape |
Close search |
Arrow keys work as aliases for hjkl in all modes. Mouse drag is also supported for moving and resizing nodes.
Config file: ~/.config/canvim/config.toml
A default config is created on first run. You can customize:
- Colors -- background, node, edge, text, crosshair, dot grid, status bar, and preset colors (1-6)
- Fonts --
node_font(family) andnode_font_size - Keybindings -- every key in every mode can be rebound
Example (default):
[colors]
background = "#0f172a"
node_background = "#1e293b"
node_border = "#334155"
edge = "#475569"
text = "#cbd5e1"
crosshair = "rgba(148, 163, 184, 0.3)"
dot_grid = "rgba(148, 163, 184, 0.08)"
node_font = "system-ui, sans-serif"
node_font_size = 14
[keybindings.normal]
pan_left = "h"
pan_right = "l"
pan_up = "k"
pan_down = "j"
add_node = "a"
select = "Enter"
insert = "i"
delete = "d"
enter_move = "m"
enter_resize = "r"
connect = "c"
enter_visual = "v"
search = "/"
# ... see config.toml for full listRequires: Rust, Node.js, Bun
bun install
bun tauri buildThe binary will be at src-tauri/target/release/canvim.
MIT
