A Sublime / VS Code-style cheatsheet for Rune's modeless editor.
Typing inserts text; modifiers do everything else. An Emacs-style
<meta-k> prefix layer is available for users coming from Emacs.
Enable it in config.yaml:
On macOS, <meta> is the Command key. On Linux / Windows it is the
Super / Windows key. See the key syntax reference
for how modifiers are spelled.
Selection
Selection is extended generically: any motion held with <shift>
extends the current selection. Releasing <shift> and pressing a
motion clears the selection. Pressing <esc> always clears it.
| Key | Action |
|---|
<shift-{motion}> | extend selection by motion |
<esc> | clear selection and search |
<meta-a> | select all |
<meta-l> | select line; repeat to extend down |
<shift-meta-j> | select indentation level |
<meta-d> | select next occurrence of word at cursor |
<ctrl-w> | expand selection semantically |
<shift-meta-space> | expand selection semantically |
<ctrl-shift-w> | shrink selection |
<ctrl-shift-m> | select enclosing (), {}, or [] |
Cursor motions
Characters and lines
| Key | Motion |
|---|
<left> <right> <up> <down> | one character / line |
<home> | start of line |
<end> | end of line |
<pgup> <pgdn> | one viewport up / down |
Word and line jumps
| Key | Motion |
|---|
<alt-left> | previous word start |
<alt-right> | next word end |
<meta-left> | start of line (first non-blank) |
<meta-right> | end of line |
<meta-up> | first line of document |
<meta-down> | last line of document |
| Key | Action |
|---|
<ctrl-alt-up> | scroll up |
<ctrl-alt-down> | scroll down |
<ctrl-l> | center current line |
<ctrl-v> | Emacs page down |
Emacs-style point motion
| Key | Motion |
|---|
<ctrl-a> | start of line |
<ctrl-e> | end of line |
<ctrl-p> | up |
<ctrl-n> | down |
<ctrl-b> | left |
<ctrl-f> | right |
<ctrl-m> | jump to matching bracket |
Editing
Typing and deletion
| Key | Action |
|---|
| any printable | insert; replaces selection if any |
<space> | insert space |
<enter> | newline (autopair-aware) |
<tab> | indent selection, else indent line |
<shift-tab> | outdent selection, else outdent line |
<backspace> | delete left (autopair-aware) |
<delete> | delete right |
<ctrl-h> | backspace |
<ctrl-d> | forward delete char |
<alt-backspace> | delete previous word |
<alt-delete> | delete to next word |
<meta-delete> | delete to end of line |
<ctrl-k> | kill to end of line |
<ctrl-shift-k> | kill whole line |
<meta-shift-k> | kill whole line |
<ctrl-t> | transpose selection (cut + paste) |
Clipboard
| Key | Action |
|---|
<meta-c> <ctrl-c> <ctrl-y> | copy selection |
<meta-x> | cut (defaults to current line if no selection) |
<meta-v> | paste |
<shift-meta-v> | paste and reindent |
<alt-meta-v> | cycle through paste history (immediately after a paste) |
Undo / redo
| Key | Action |
|---|
<meta-z> <ctrl-z> | undo |
<meta-y> <shift-meta-z> | redo |
Line operations
| Key | Action |
|---|
<alt-shift-down> <shift-meta-d> | duplicate line down |
<alt-shift-up> | duplicate line up |
<alt-down> <ctrl-meta-down> | move line down |
<alt-up> <ctrl-meta-up> | move line up |
<ctrl-enter> | insert blank line below |
<ctrl-shift-enter> | insert blank line above |
<meta-j> | join with next line |
| Key | Action |
|---|
<tab> <meta-]> | indent |
<shift-tab> <meta-[> | outdent |
<meta-/> | toggle line comment |
<alt-meta-/> | toggle block comment |
Paragraph
| Key | Action |
|---|
<alt-meta-q> | wrap paragraph at ruler |
Search
| Key | Action |
|---|
<meta-f> | open search |
<ctrl--> | next match |
<ctrl-_> | previous match |
<esc> | clear search |
Replace is not bound in the modeless handler; use a Rune command.
Folds
| Key | Action |
|---|
<ctrl-shift-z> | toggle fold under cursor |
<ctrl-shift-a> | toggle all folds |
<alt-{> <alt-meta-[> | collapse fold |
<alt-}> <alt-meta-]> | expand fold |
<meta-k> j | expand all folds |
<meta-k> 1 | collapse all folds |
<ctrl-alt-h> | hide selection |
<ctrl-alt-v> | unhide |
Macros
| Key | Action |
|---|
<ctrl-q> | toggle macro recording (unnamed register) |
<ctrl-shift-q> | play macro |
<meta-k> arms a one-shot prefix. The next keystroke runs an Emacs-
style command:
| Sequence | Action |
|---|
<meta-k> <space> | set mark at cursor |
<meta-k> a | select from mark to cursor |
<meta-k> w | cut from mark to cursor |
<meta-k> x | swap point and mark |
<meta-k> g | clear mark |
<meta-k> u | uppercase selection |
<meta-k> l | lowercase selection |
<meta-k> k | kill to end of line |
<meta-k> <backspace> | kill to start of line |
<meta-k> j | expand all folds |
<meta-k> 1 | collapse all folds |
There is no <ctrl-x> prefix in modeless. <ctrl-x> is unbound; the
cut binding is <meta-x>.
Auto-pair
When autoPair is on (default), typing one of (, [, {, ", '
inserts the matching close. <enter> and <backspace> inside an empty
pair behave as expected (split block, delete pair).
Bracketed paste
Pasting from the terminal is detected and inserted verbatim as a single
text run, with no auto-indent rewriting, no autopair-injected closers.
Command Prompt
<shift-meta-p> is the modeless bootstrap default for the
Command Prompt. See the prompt guide for how
to run commands, bind aliases, and pass arguments.
What's not here
The modeless handler intentionally does not implement:
- Multi-cursor editing.
- A
<ctrl-x> Emacs prefix layer (use <meta-k> instead).
<ctrl-u> kill-to-line-start (use <meta-k> <backspace>).
- Built-in in-buffer replace UI.
- Completion popup (the modeless handler does not own a completion
layer; completion lives in language extensions).
- Goto-line (use the Command Prompt).
If you find a Sublime / VS Code / Emacs binding you expected and it
isn't on this page, it probably isn't implemented; please open an
issue with the keystroke and the buffer state where you expected it
to work.