This is the reference for Vim behavior currently implemented by Lumide. A
count may prefix commands marked as counted. Operator and motion counts
multiply, so 3d2w affects six words. <C-X> means Ctrl-X
and <S-Tab>
means Shift-Tab.
Settings and UI#
Vim is an enabled-by-default built-in plugin that can be toggled from the Installed Plugins view. Its dedicated settings category is hidden while the plugin is disabled. Vim settings expose modal-editing enablement, clipboard policy, relative line numbers, ignore-case, smart-case, search wrap, search highlighting, status indicator style, global and local leaders, mapping timeout, and an optional Vim configuration path. The indicator can be hidden or shown as a Vim string, simple text, or a capsule chip. Configuration changes apply to open editors. Modifier chords outside Vim's grammar pass through to the selected base keymap; Vim-native chords take precedence.
Normal and Visual modes use a block cursor, Insert uses a bar, and Replace uses an underline. The status bar exposes mode, pending keys and counts, macro recording, prompts, typed diagnostics, and typed Ex output. The same state is available to accessibility semantics without putting display messages in the command engine.
Modes#
| Keys | Result |
|---|---|
i, a | Enter Insert before or after the cursor. |
I, A |
Enter Insert at the first non-blank or end of the line. |
o, O |
Open an indented line below or above and enter Insert. |
R | Enter Replace mode. |
v, V, <C-V> |
Enter Visual character, line, or block mode. |
<C-O> in Insert |
Run one complete Normal command, then return to Insert. |
<Esc>, <C-[> |
Return toward Normal mode or cancel a pending command. |
<C-C> |
Cancel Insert, Replace, Visual, a pending command, or a prompt. |
<Esc> in Normal |
Clear pending input and remove additional cursors. |
Insert and Replace preserve Lumide's normal text entry, auto-pairs, indentation, snippets, and completion behavior. Leaving Insert or Replace moves the cursor left where Vim does. An Insert session is one undo step. Layout-generated Alt and AltGr text remains insertable and dot-repeatable.
Insert-mode commands#
| Keys | Result |
|---|---|
<C-W> | Delete the previous word. |
<C-U> | Delete to the start of the insertion line. |
<C-H>, <C-J> |
Delete backward or insert a line break. |
<C-T>, <C-D> |
Indent or outdent the current line. |
<C-R>{register} | Insert a readable register. |
<C-R>= | Evaluate an arithmetic expression and insert its result. |
<C-]> | Expand an Insert abbreviation without a terminator. |
<C-N>, <C-P> |
Select the next or previous Lumide completion. |
Motions#
All core motions are counted and compose with operators unless stated otherwise.
Character, line, and document motions#
| Keys | Result |
|---|---|
h, j, k, l |
Move left, down, up, or right. Arrow keys are aliases. |
<C-N>, <C-P> |
Move down or up by logical lines. |
Space, Backspace |
Move right or left without crossing a line. |
0, ^, $ |
First column, first non-blank, or end of line. |
[count]| | Counted one-based screen column; column 1 when omitted. |
g_ | Last non-blank character, optionally on a counted later line. |
+, Enter, - |
First non-blank on a following or preceding line. |
_ | First non-blank on the counted line downward. |
gg, G |
First or last document line; a count selects that line number. |
{count}% |
Jump to a percentage of the document. Without a count, match a pair. |
H, M, L |
Top, middle, or bottom visible row. Counts offset H and L. |
<C-F>, <C-B> |
Scroll and move by full viewports. |
<C-D>, <C-U> |
Scroll and move by half viewports. |
<C-E>, <C-Y> |
Scroll down or up by counted display lines without moving the cursor. |
Horizontal commands respect Unicode grapheme boundaries. Vertical commands retain the desired column across shorter lines.
Words, sentences, and paragraphs#
| Keys | Result |
|---|---|
w, W | Start of the next word or whitespace-delimited WORD. |
b, B | Start of the previous word or WORD. |
e, E | End of the current or next word or WORD. |
ge, gE | End of the previous word or WORD. |
(, ) | Previous or next sentence boundary. |
{, } | Previous or next paragraph boundary. |
Find, pairs, marks, and history#
| Keys | Result |
|---|---|
f{char}, F{char} |
Find a character forward or backward on the line. |
t{char}, T{char} |
Move until immediately before or after the character. |
;, , |
Repeat the last find in the same or opposite direction. |
% |
Match nested
()
,
[]
, or
{}
; search forward on the line for a pair when needed.
|
m{letter} | Set a tracked letter mark. |
`{mark} | Jump to the exact mark position. |
'{mark} | Jump to the mark's first non-blank, linewise for operators. |
``, '' | Jump to the previous context position. |
<C-O>, <C-I> |
Move backward or forward through jump history. |
g;, g, | Move backward or forward through change locations. |
Searches, mark jumps, host-provided locations, and major document jumps participate in tracked jump history.
Display-row motions#
These use measured soft-wrap and viewport geometry when it is available, with logical-line fallbacks where appropriate.
| Keys | Result |
|---|---|
gj, gk | Move down or up by display rows. |
g0, g^, gm, g$ |
Start, first non-blank, middle, or end of a display row. |
gM | Move to 50% of the line, or to a counted percentage. |
zt, zz, zb |
Align the cursor row at the top, middle, or bottom. |
z<Enter>, z., z- |
Aliases for top, middle, and bottom alignment. |
Search#
| Keys | Result |
|---|---|
/{text}, ?{text} | Search forward or backward. |
n, N | Repeat in the same or opposite direction. |
*, # |
Search forward or backward for the whole word under the cursor. |
g*, g# |
Search forward or backward without whole-word boundaries. |
:nohlsearch | Clear presented search highlights. |
Search supports counted navigation, wrap/no-wrap, ignore-case, smart-case, and highlight options. Search highlights are presentation state; navigation still finds matches beyond the highlighted subset.
Operators and edits#
Operators#
| Keys | Result |
|---|---|
d{motion}, c{motion}, y{motion} |
Delete, change, or yank a motion/text object. |
>{motion}, <{motion} |
Indent or outdent complete affected lines. |
={motion} | Format the range through Lumide. |
gq{motion}, gw{motion} | Format text through Lumide. |
g~{motion}, gu{motion}, gU{motion} |
Toggle, lower, or uppercase a range. |
!{motion} | Filter complete affected lines through an external command. |
dd
,
cc
,
yy
,
>>
,
<<
,
==
,
g~~
,
guu
,
gUU
,
gqq
,
gww
,
!!
|
Apply the operator linewise. |
The filter prompt accepts normal command-line editing. A successful filter is dot-repeatable and its pending range follows document edits.
Direct edits and replay#
| Keys | Result |
|---|---|
x, X |
Delete graphemes forward or backward without crossing a line. |
s, S |
Substitute counted characters or change counted lines. |
D, C, Y |
Delete/change to line end, or yank counted complete lines. |
r{char} | Replace counted characters with one character. |
J, gJ |
Join lines with Vim whitespace cleanup, or join raw. |
~ | Toggle the case of counted characters. |
<C-A>, <C-X> |
Increment or decrement the number under or after the cursor. |
u, <C-R> | Undo or redo. |
U | Restore the current line to its state when the cursor entered it. |
. |
Repeat the last structured change; a count overrides its stored count. |
gi | Insert at the tracked last-insert position. |
Dot replay covers operators, direct edits, puts, Visual shapes, Insert and Replace sessions, auto-pair-aware input intent, abbreviations, registers, counts, and filters.
Text objects#
Use each object after an operator or after i/a in Visual mode. i
selects
inside; a selects the surrounding form where one exists.
| Object | Supported keys and meaning |
|---|---|
| Word | iw, aw, iW, aW for words and WORDs. |
| Quotes |
i"
,
a"
,
i'
,
a'
,
i`
,
a`
on the current line.
|
| Parentheses |
ib
,
ab
,
i(
,
a(
,
i)
,
a)
with counted outer nesting.
|
| Braces |
iB
,
aB
,
i{
,
a{
,
i}
,
a}
with counted outer nesting.
|
| Brackets/angles |
i[
,
a[
,
i]
,
a]
,
i<
,
a<
,
i>
,
a>
.
|
| Sentence/paragraph | is, as, ip, ap, including counts. |
| Line | il trims edge whitespace; al selects counted complete lines. |
| Argument |
ia
,
aa
select comma-separated arguments and respect nested brackets and quotes.
|
| Entire buffer | ie trims document-edge whitespace; ae includes it. |
| Indentation | ii, ai select indentation blocks and surrounding boundaries. |
| Comment |
ic
,
ac
support
/* */
and contiguous
//
,
--
, or
#
comments.
|
| Tag | it, at select matching nested tags; counts select an outer tag. |
Visual mode#
| Keys | Result |
|---|---|
v, V, <C-V> |
Switch to character, line, or block selection. |
gv | Restore the previous Visual selection. |
o | Swap the active and fixed endpoints. |
O in Visual Block | Swap horizontal block endpoints. |
| Motions, finds, marks, text objects | Extend the inclusive selection. |
d/x, c/s, y |
Delete, change, or yank the selection. |
>, <, =, ! |
Indent, outdent, format, or filter selected lines. |
~, u, U, g~, gu, gU |
Toggle, lower, or uppercase the selection. |
Visual Block delete/yank/change uses aligned per-line selections and blockwise registers. A block change leaves aligned Insert cursors.
Registers and puts#
Prefix an operator or put with "{register}. A count may appear before or
after register selection.
| Register | Meaning |
|---|---|
" | Unnamed register. |
0 | Most recent yank. |
1–9 | Numbered delete history. |
- | Most recent small characterwise delete. |
a–z |
Named registers; uppercase appends to the lowercase register. |
_ | Black-hole register. |
+, * |
System clipboard and primary selection through Lumide's adapter. |
. | Last inserted text, readable with Insert <C-R>. |
/, : |
Last search and last Ex command, readable with Insert <C-R>. |
= | Arithmetic expression register. |
| Keys | Result |
|---|---|
p, P |
Put after/before with characterwise, linewise, or blockwise shape. |
gp, gP |
Put after/before and leave the cursor after inserted text. |
]p, [p | Put after/before and adjust linewise indentation. |
:registers [names] |
Show populated registers as typed output. :reg is an alias. |
Clipboard policy can redirect implicit register operations to * or +;
explicit register selection always wins. Successive dot-repeated puts advance
numbered registers from 1 through 9, matching Vim delete-history replay.
Macros, mappings, and abbreviations#
| Keys | Result |
|---|---|
q{letter} | Record a macro; uppercase appends to the lowercase macro. |
q while recording | Stop recording. |
@{letter}, @@ |
Play a macro or repeat the last macro, with counts. |
Mappings are mode-scoped for Normal, Visual, Operator-pending, Insert, and
Command-line modes. Recursive and non-recursive mappings, ambiguous prefixes,
timeouts, <Nop>, <silent>, <leader>, and
<localleader> are supported.
Mappings take precedence over editor overlays and active snippet sessions.
Runtime mapping commands include map, nmap, vmap/xmap,
omap, imap,
cmap, their noremap, unmap, and mapclear
variants, plus inspection by
omitting the right-hand side.
Insert and Command-line abbreviations implement Vim keyword-boundary rules.
They expand on a non-keyword terminator or explicitly with <C-]>.
Ex command line#
Enter with :. Left/Right, Home/End, grapheme-safe
Backspace/Delete, <C-U>, and <C-W>
edit the prompt. Up/Down browse
history. Tab and <S-Tab> cycle built-in and user-command completion.
<Esc>, <C-[>, or <C-C> cancel.
Addresses and ranges#
Supported addresses are the current line ., final line $, one-based line
numbers, % for the whole document, and comma- or semicolon-separated ranges.
A semicolon makes the first address current while resolving the second. A bare
address moves the cursor.
Local Ex commands#
| Command | Supported behavior |
|---|---|
:delete ["r], :yank ["r], :put ["r] |
Delete, yank, or put with an optional register. |
:join |
Join the addressed lines; without a range, join the current and next line. |
:sort[!] [i][n][u] |
Sort, reverse, ignore case, compare embedded numbers, and/or deduplicate. |
:substitute / :s |
Regex replacement on the addressed lines. Flags:
g
,
c
,
i
,
I
.
|
:&, :&&, :~ |
Repeat substitution;
&&
retains flags and
~
uses the last search pattern.
|
| Confirmation keys |
y
yes,
n
no,
a
all,
l
last then quit,
q
quit.
|
:global/{pattern}/{command} |
Execute a local Ex command on matching addressed lines. |
:vglobal/{pattern}/{command}, :global! |
Execute on non-matching addressed lines. |
:normal[!] {keys} | Run Vim key notation on each addressed line. |
:set | Query or change supported runtime options. |
:registers [names], :marks [names] |
Return typed register or mark rows. |
:jumps, :changes |
Return typed jump-list or change-list locations. |
| Mapping commands | Add, remove, clear, or inspect runtime mappings. |
:nohlsearch | Clear search highlights. |
Substitute replacement supports & for the full match, \1–\9
for capture
groups, escaped delimiters, and escaped literal characters.
Runtime :set options are ignorecase/ic, smartcase/scs,
wrapscan/ws, hlsearch/hls, timeout,
timeoutlen/tm, and
clipboard/cb. Boolean options accept no and
inv forms; options support
? queries, and :set all returns all typed states.
IDE-owned Ex commands#
| Commands | Result |
|---|---|
:write[!], :wq[!], :exit[!] |
Save, save and close, or exit according to modification state. |
:quit[!], :close[!], :bdelete[!], :tabclose[!] |
Close the current editor, with force support. |
:qall[!], :qa[!] |
Close all editors; force discards unsaved changes. |
:edit {path} | Open a file. |
:split [path], :vsplit [path] |
Open the current editor or a file in a horizontal or vertical split. |
:tabnew [path] | Create an untitled editor tab or open a file in a tab. |
:bnext, :bprevious | Move through open editor tabs. |
:buffer {number-or-path} |
Select an open editor in the current tab group. |
:tabnext, :tabprevious | Move through open editor tabs. |
:buffers, :files, :ls |
Show typed open-buffer state. |
:terminal | Open a terminal. |
ZZ, ZQ | Save and close, or force close, from Normal mode. |
Common unambiguous Vim abbreviations such as :w, :q, :e, :sp,
:vs,
:bn, :bp, :bd, and :term are accepted.
IDE navigation#
| Keys | Lumide action |
|---|---|
gd, gD, gr, gI |
Definition, declaration, references, implementation. |
<C-]> | Definition. |
K | Hover. |
gR, g., gO, gS |
Rename, code action, document symbols, workspace symbols. |
]d, [d | Next or previous diagnostic. |
]c, [c | Next or previous Git change. |
gt, gT |
Next or previous editor tab; [count]gt selects that tab number. |
Folds#
| Keys | Result |
|---|---|
za, zA | Toggle the current fold or its recursive subtree. |
zc, zC | Close one or counted folds, or close recursively. |
zo, zO | Open one or counted folds, or open recursively. |
zM, zR | Close or open all folds. |
Panes#
| Keys | Result |
|---|---|
<C-W>h/j/k/l |
Focus the pane left/down/up/right; arrows are aliases. |
<C-W>w, <C-W>W |
Focus the next or previous pane. |
<C-W>s, <C-W>S | Split horizontally. |
<C-W>v | Split vertically. |
<C-W>c, <C-W>q | Close the current pane. |
<C-W>o | Close other panes. |
<C-W>= | Equalize pane sizes. |
Vim configuration subset#
The optional configuration file supports:
-
let mapleader = "...",let g:mapleader = "...", and equivalentmaplocalleadernames. -
setforignorecase,smartcase,wrapscan,hlsearch,timeout,timeoutlen, andclipboard, including documented short andnoforms. -
map,nmap,vmap/xmap,omap,imap,cmap,map!, corresponding non-recursive forms, and matchingunmap/mapclearforms. -
Insert and Command-line
abbreviate,noreabbrev,unabbreviate, andabclearfamilies. -
Uppercase zero-argument
command/command!,delcommand, andcomclear. -
Key notation for printable Unicode graphemes,
<Esc>,<CR>,<Tab>,<BS>,<Del>,<Space>,<lt>, arrows, Home/End, leaders, and Ctrl/Alt/Meta/Shift modifier forms for printable and named keys.
Unsupported statements, options, attributes, values, and key notation produce typed diagnostics. Arbitrary Vimscript, plugins, expressions in mappings, and buffer-local mappings are not executed.
Safety and compatibility boundaries#
- Counts, command-line input, generated edit output, Visual Block selections, macro execution, mapping execution, configuration size, retained registers/mappings/abbreviations/commands, search highlights, substitution confirmation and output, Ex presentation/target tracking/sorting, filter output, and Insert replay state are bounded. Exposed failures are typed so the UI can localize them.
- Normal motions use Rope ranges and do not materialize the full document.
-
Search patterns are literal text;
:substituteand:globalpatterns use Dart regular expressions. - External filters require a desktop host process. Browser builds depend on host capabilities.
- Vim help, save-as/write-all, shell-backed writes, vimgrep, and quickfix Ex workflows are not implemented.
- Advanced tab/pane rearrangement, manual fold creation or level control, and Vim diff-mode commands are not implemented.
- Filename registers
%/#and persisted special marks are not implemented. - Vim plugins and arbitrary Vimscript are outside the supported surface.
