Vim Mode
Ariv includes a full Vim emulation layer for the editor, powered by CodeMirror 6’s Vim extension. If you’re comfortable with Vim, you can edit notes using the motions and commands you already know.
Enabling Vim Mode
Section titled “Enabling Vim Mode”Open Settings > Editor and toggle Vim Mode on. The setting key is editor.vimMode.
Once enabled, the editor immediately switches to Normal mode and the cursor changes to a block. No restart required.
Vim Mode supports the four core Vim modes:
| Mode | How to enter | Purpose |
|---|---|---|
| Normal | Escape from any mode | Navigate and manipulate text |
| Insert | i, a, o, A, I, O, etc. | Type and edit text directly |
| Visual | v, V, or Ctrl+V from Normal mode | Select text for operations |
| Command-line | : from Normal mode | Run Ex commands |
Motions
Section titled “Motions”Standard Vim motions work as expected:
| Motion | Action |
|---|---|
h / j / k / l | Move left / down / up / right |
w / b / e | Next word / previous word / end of word |
0 / $ | Start / end of line |
^ | First non-blank character of line |
gg / G | Top / bottom of document |
{ / } | Previous / next paragraph |
f{char} / F{char} | Jump to next / previous occurrence of character |
t{char} / T{char} | Jump to just before next / previous occurrence of character |
% | Jump to matching bracket |
Common operations
Section titled “Common operations”| Command | Action |
|---|---|
dd | Delete the current line |
yy | Yank (copy) the current line |
p / P | Paste after / before cursor |
cc | Change the current line (delete and enter Insert mode) |
x | Delete the character under the cursor |
r{char} | Replace the character under the cursor |
u | Undo |
Ctrl+R | Redo |
. | Repeat the last command |
>> / << | Indent / outdent the current line |
J | Join the current line with the next |
Search
Section titled “Search”| Command | Action |
|---|---|
/pattern | Search forward for pattern |
?pattern | Search backward for pattern |
n | Jump to the next match |
N | Jump to the previous match |
* | Search forward for the word under the cursor |
# | Search backward for the word under the cursor |
Text objects
Section titled “Text objects”Text objects let you operate on structured chunks of text. Combine them with operators like d (delete), c (change), or y (yank).
| Text object | What it selects |
|---|---|
iw / aw | Inner word / a word (including surrounding space) |
is / as | Inner sentence / a sentence |
ip / ap | Inner paragraph / a paragraph |
i" / a" | Inside double quotes / including the quotes |
i' / a' | Inside single quotes / including the quotes |
i( / a( | Inside parentheses / including the parentheses |
i[ / a[ | Inside brackets / including the brackets |
i{ / a{ | Inside braces / including the braces |
For example, ci" changes the text inside double quotes, and dap deletes an entire paragraph.
Visual mode
Section titled “Visual mode”| Command | Action |
|---|---|
v | Enter character-wise Visual mode |
V | Enter line-wise Visual mode |
Ctrl+V | Enter block-wise Visual mode |
Once in Visual mode, use any motion to extend the selection, then apply an operator:
dto delete the selectionyto yank the selectioncto change the selection>/<to indent / outdent the selection~to toggle case
Ex commands
Section titled “Ex commands”Press : in Normal mode to open the command line. Supported commands include:
| Command | Action |
|---|---|
:w | Save the current note |
:q | Close the current note |
:wq | Save and close |
:s/old/new/ | Replace first occurrence on the current line |
:s/old/new/g | Replace all occurrences on the current line |
:%s/old/new/g | Replace all occurrences in the document |
:noh | Clear search highlighting |
How Vim Mode works with Ariv shortcuts
Section titled “How Vim Mode works with Ariv shortcuts”Vim Mode handles text editing inside the note. Ariv’s own shortcuts handle everything outside the editor — navigation, panels, search, and commands. The two layers work together without conflict.
| Layer | Examples | When it applies |
|---|---|---|
| Vim | dd, yy, /search, :w | While the editor has focus |
| Ariv | Cmd+P, Cmd+E, Cmd+O | Always |
Ariv shortcuts that use Cmd (or Ctrl on Windows) as a modifier continue to work normally in Vim mode. For example, Cmd+P still opens the Command Palette, and Cmd+E still toggles the sidebar, even when you’re in Normal mode.
Recommended settings for Vim users
Section titled “Recommended settings for Vim users”When you enable Vim Mode, you may also want to adjust these editor settings for a more authentic experience:
- Cursor style: Set to Block. In Normal mode the cursor automatically displays as a block, but setting this ensures consistency.
- Cursor blink: Turn off. A blinking block cursor is distracting in Normal mode, and traditional Vim uses a steady cursor.
Both settings are available in Settings > Editor.
Related: Shortcut Reference — Complete list of all Ariv keyboard shortcuts | Scratchpad — Persistent scratch space for temporary text