Movement
|
Move left |
|
Move down |
|
Move up |
|
Move right |
|
Move next word start |
|
Move previous word start |
|
Move next WORD start |
|
Move previous WORD start |
|
Move next WORD end |
|
Find 'till next char |
|
Find next char |
|
Find 'till previous char |
|
Find previous char |
|
Go to line number |
|
Go to line number |
|
Repeat last motion (f, t or m) |
|
Move to the start of the line |
|
Move to the end of the line |
|
Move page up |
|
Move page down |
|
Move half page up |
|
Move half page down |
|
Jump forward on the jumplist |
|
Jump backward on the jumplist |
|
Save the current selection to the jumplist |
Changes
|
Replace with a character |
|
Replace with yanked text |
|
Switch case of the selected text |
|
Set the selected text to lower case |
|
Set the selected text to upper case |
|
Insert before selection |
|
Insert after selection (append) |
|
Insert at the start of the line |
|
Insert at the end of the line |
|
Open new line below selection |
|
Open new line above selection |
|
Repeat last insert |
|
Undo change |
|
Redo change |
|
Move backward in history |
|
Move forward in history |
|
Yank selection |
|
Paste after selection |
|
Paste before selection |
|
Select a register to yank to or paste from |
|
Indent selection |
|
Unindent selection |
|
Format selection (currently nonfunctional/disabled) (LSP) |
|
Delete selection |
|
Delete selection, without yanking |
|
Change selection (delete and enter insert mode) |
|
Change selection (delete and enter insert mode, without yanking) |
|
Increment object (number) under cursor |
|
Decrement object (number) under cursor |
|
Start/stop macro recording to the selected register (experimental) |
|
Play back a recorded macro from the selected register (experimental) |
Shell
|
Pipe each selection through shell command, replacing with output |
|
Pipe each selection into shell command, ignoring output |
|
Run shell command, inserting output before each selection |
|
Run shell command, appending output after each selection |
|
Pipe each selection into shell command, keep selections where command returned 0 |
Selection manipulation
|
Select all regex matches inside selections |
|
Split selection into sub selections on regex matches |
|
Split selection on newlines |
|
Merge consecutive selections |
|
Align selection in columns |
|
Trim whitespace from the selection |
|
Collapse selection onto a single cursor |
|
Flip selection cursor and anchor |
|
Ensures the selection is in forward direction |
|
Keep only the primary selection |
|
Remove the primary selection |
|
Copy selection onto the next line (Add cursor below) |
|
Copy selection onto the previous line (Add cursor above) |
|
Rotate main selection backward |
|
Rotate main selection forward |
|
Rotate selection contents backward |
|
Rotate selection contents forward |
|
Select entire file |
|
Select current line, if already selected, extend to next line |
|
Extend selection to line bounds (line-wise selection) |
|
Shrink selection to line bounds (line-wise selection) |
|
Join lines inside selection |
|
Join lines inside selection and select the inserted space |
|
Keep selections matching the regex |
|
Remove selections matching the regex |
|
Comment/uncomment the selections |
|
Expand selection to parent syntax node (TS) |
|
Shrink syntax tree object selection (TS) |
|
Select previous sibling node in syntax tree (TS) |
|
Select next sibling node in syntax tree (TS) |
Search
|
Search for regex pattern |
|
Search for previous pattern |
|
Select next search match |
|
Select previous search match |
|
Use current selection as the search pattern |
Minor modes
|
Enter select (extend) mode |
|
Enter goto mode |
|
Enter match mode |
|
Enter command mode |
|
Enter view mode |
|
Enter sticky view mode |
|
Enter window mode |
|
Enter space mode |
View Mode
|
Vertically center the line |
|
Align the line to the top of the screen |
|
Align the line to the bottom of the screen |
|
Align the line to the middle of the screen (horizontally) |
|
Scroll the view downwards |
|
Scroll the view upwards |
|
Move page down |
|
Move page up |
|
Move half page down |
|
Move half page up |
Goto mode
|
Go to line number |
|
Go to the end of the file |
|
Go to files in the selection |
|
Go to the start of the line |
|
Go to the end of the line |
|
Go to first non-whitespace character of the line |
|
Go to the top of the screen |
|
Go to the middle of the screen |
|
Go to the bottom of the screen |
|
Go to definition (LSP) |
|
Go to type definition (LSP) |
|
Go to references (LSP) |
|
Go to implementation (LSP) |
|
Go to the last accessed/alternate file |
|
Go to the last modified/alternate file |
|
Go to next buffer |
|
Go to previous buffer |
|
Go to last modification in current file |
|
Move down textual (instead of visual) line |
|
Move up textual (instead of visual) line |
Match mode
|
Goto matching bracket (TS) |
|
Surround current selection with |
|
Replace surround character |
|
Delete surround character |
|
Select around textobject |
|
Select inside textobject |
Window mode
|
Switch to next window |
|
Vertical right split |
|
Horizontal bottom split |
|
Go to files in the selection in horizontal splits |
|
Go to files in the selection in vertical splits |
|
Move to left split |
|
Move to split below |
|
Move to split above |
|
Move to right split |
|
Close current window |
|
Only keep the current window, closing all the others |
|
Swap window to the left |
|
Swap window downwards |
|
Swap window upwards |
|
Swap window to the right |
Space mode
|
Open file picker |
|
Open file picker at current working directory |
|
Open buffer picker |
|
Open jumplist picker |
|
Debug (experimental) |
|
Show documentation for item under cursor in a popup (LSP) |
|
Open document symbol picker (LSP) |
|
Open workspace symbol picker (LSP) |
|
Open document diagnostics picker (LSP) |
|
Open workspace diagnostics picker (LSP) |
|
Rename symbol (LSP) |
|
Apply code action (LSP) |
|
Select symbol references (LSP) |
|
Open last fuzzy picker |
|
Enter window mode |
|
Paste system clipboard after selections |
|
Paste system clipboard before selections |
|
Join and yank selections to clipboard |
|
Yank main selection to clipboard |
|
Replace selections by clipboard contents |
|
Global search in workspace folder |
|
Open command palette |
Popup
|
Scroll up |
|
Scroll down |
Unimpaired
|
Go to next diagnostic (LSP) |
|
Go to previous diagnostic (LSP) |
|
Go to last diagnostic in document (LSP) |
|
Go to first diagnostic in document (LSP) |
|
Go to next function (TS) |
|
Go to previous function (TS) |
|
Go to next type definition (TS) |
|
Go to previous type definition (TS) |
|
Go to next argument/parameter (TS) |
|
Go to previous argument/parameter (TS) |
|
Go to next comment (TS) |
|
Go to previous comment (TS) |
|
Go to next test (TS) |
|
Go to previous test (TS) |
|
Go to next paragraph |
|
Go to previous paragraph |
|
Go to next change |
|
Go to previous change |
|
Go to last change |
|
Go to first change |
|
Add newline below |
|
Add newline above |
Insert mode
|
Switch to normal mode |
|
Commit undo checkpoint |
|
Autocomplete |
|
Insert a register content |
|
Delete previous word |
|
Delete next word |
|
Delete to start of line |
|
Delete to end of line |
|
Delete previous char |
|
Delete next char |
|
Insert new line |
|
Move to previous line |
|
Move to next line |
|
Backward a char |
|
Forward a char |
|
Move one page up |
|
Move one page down |
|
Move to line start |
|
Move to line end |
Picker
|
Previous entry |
|
Next entry |
|
Page up |
|
Page down |
|
Go to first entry |
|
Go to last entry |
|
Open selected |
|
Open horizontally |
|
Open vertically |
|
Toggle preview |
|
Close picker |
Prompt
|
Close prompt |
|
Backward a word |
|
Backward a char |
|
Forward a word |
|
Forward a char |
|
Move prompt end |
|
Move prompt start |
|
Delete previous word |
|
Delete next word |
|
Delete to start of line |
|
Delete to end of line |
|
Delete previous char |
|
Delete next char |
|
Insert a word under doc cursor, may be changed to Ctrl-r Ctrl-w later |
|
Select previous history |
|
Select next history |
|
Insert the content of the register selected by following input char |
|
Select next completion item |
|
Select previous completion item |
|
Open selected |
Commands
|
Close the current view. |
|
Force close the current view, ignoring unsaved changes. |
|
Open a file from disk into the current view. |
|
Close the current buffer. |
|
Close the current buffer forcefully, ignoring unsaved changes. |
|
Close all buffers but the currently focused one. |
|
Force close all buffers but the currently focused one. |
|
Close all buffers without quitting. |
|
Force close all buffers ignoring unsaved changes without quitting. |
|
Goto next buffer. |
|
Goto previous buffer. |
|
Write changes to disk. Accepts an optional path (:write some/path.txt) |
|
Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write! some/path.txt) |
|
Write changes to disk and closes the buffer. Accepts an optional path (:write-buffer-close some/path.txt) |
|
Force write changes to disk creating necessary subdirectories and closes the buffer. Accepts an optional path (:write-buffer-close! some/path.txt) |
|
Create a new scratch buffer. |
|
Format the file using the LSP formatter. |
|
Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.) |
|
Set the document's default line ending. Options: crlf, lf. |
|
Jump back to an earlier point in edit history. Accepts a number of steps or a time span. |
|
Jump to a later point in edit history. Accepts a number of steps or a time span. |
|
Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt) |
|
Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt) |
|
Write changes from all buffers to disk. |
|
Write changes from all buffers to disk and close all views. |
|
Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes). |
|
Close all views. |
|
Force close all views ignoring unsaved changes. |
|
Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2). |
|
Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2). |
|
Change the editor theme (show current theme if no name specified). |
|
Yank main selection into system clipboard. |
|
Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline. |
|
Yank main selection into system primary clipboard. |
|
Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline. |
|
Paste system clipboard after selections. |
|
Paste system clipboard before selections. |
|
Replace selections with content of system clipboard. |
|
Paste primary clipboard after selections. |
|
Paste primary clipboard before selections. |
|
Replace selections with content of system primary clipboard. |
|
Show clipboard provider name in status bar. |
|
Change the current working directory. |
|
Show the current working directory. |
|
Set encoding. Based on https://encoding.spec.whatwg.org. |
|
Get info about the character under the primary cursor. |
|
Discard changes and reload from the source file. |
|
Discard changes and reload all documents from the source files. |
|
Write changes only if the file has been modified. |
|
Open workspace command picker |
|
Restarts the Language Server that is in use by the current doc |
|
Stops the Language Server that is in use by the current doc |
|
Display tree sitter scopes, primarily for theming and development. |
|
Start a debug session from a given template with given parameters. |
|
Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters. |
|
Evaluate expression in current debug context. |
|
Open the file in a vertical split. |
|
Open a scratch buffer in a vertical split. |
|
Open the file in a horizontal split. |
|
Open a scratch buffer in a horizontal split. |
|
Open the tutorial. |
|
Goto line number. |
|
Set the language of current buffer (show current language if no value specified). |
|
Set a config option at runtime. For example to disable smart case search, use :set search.smart-case false. |
|
Toggle a boolean config option at runtime. For example to toggle smart case search, use :toggle search.smart-case. |
|
Get the current value of a config option. |
|
Sort ranges in selection. |
|
Sort ranges in selection in reverse order. |
|
Hard-wrap the current selection of lines to a given width. |
|
Display tree sitter subtree under cursor, primarily for debugging queries. |
|
Refresh user config. |
|
Open the user config.toml file. |
|
Open the workspace config.toml file. |
|
Open the helix log file. |
|
Run shell command, inserting output before each selection. |
|
Run shell command, appending output after each selection. |
|
Pipe each selection to the shell command. |
|
Pipe each selection to the shell command, ignoring output. |
|
Run a shell command |
|
Reset the diff change at the cursor position. |
|
Clear given register. If no argument is provided, clear all registers. |
Notes
References