sim key overview

A key overview taken from the product's docs. Only keys the docs list as built are here. The complete list is the product's own key table, `sim/keys.tsv`.

Starting

KeysWhat they do
simsim dirOpen the tree of the current directory, or of dir.
sim filesim file:42Open a file (with the tree closed), optionally at a line.
sim +/re fileOpen a file and search for a pattern first.

Saving and quitting

KeysWhat they do
Ctrl-sSave, in every mode.
ZZ:x:wqSave if modified, and quit.
q:qClose the current file; closing the last one exits.
ZQ:q!Close without saving.
:w!Save even over a read-only file, or keep your version over a change on disk.
:wa:qa:qa!Save all, quit all, quit all discarding changes.
:cqQuit with exit code 1 (aborts a git commit).

The tree

KeysWhat they do
Ctrl-nOpen and focus the tree, or close it when it has focus.
jkMove down and up.
lEnterExpand a directory, or open a file.
h-Collapse a directory (or go to its parent); - collapses everything.
/Search every file under the root as you type.
.Narrow the tree to changed, open and recent files; again shows everything.
EscqGive the focus back to the text; q closes the tree.

Finding files and text

KeysWhat they do
Ctrl-pFind files by fuzzy match, from anywhere.
Ctrl-fSearch the contents of every file as you type, from anywhere.
Ctrl-nCtrl-p↓↑Move the selection.
EnterOpen the selected result.
EscClose the window; everything is as it was.

Several files

KeysWhat they do
TabShift-TabNext and previous open file.
:e file:e!Open another file; reload this one.

The vi grammar

KeysWhat they do
h j k lw b e0 ^ $gg Gf F t T ; ,%Ctrl-d Ctrl-uMotions, with counts.
x r J p PuCtrl-r.i a I A o Odd cc yy D C Y>> <<Editing, repeating and undoing.
d c y > <iw aw i" a( i{ …Operators, combined with a motion or a text object.
vVoVisual mode: characters, lines, swap ends.
/?n N* #:nohIncremental, smartcase search, and clearing its highlight.
:{N}:%s/re/rep/g:{range}Go to a line, substitute, and ranges (%, ., $, '<,'>).
YUWhere sim departs from vi: Y yanks to the end of the line, U redoes.
"ayw"ap:registersRegisters: put a name before a command ("ayw yanks into a, "ap puts it); "A adds, "0 is the last yank, "1 to "9 the last deletes, "+ writes the system clipboard. :registers lists them.
ma'a`a'':marksMarks: ma sets one, 'a goes to its line, the backtick key to its place, '' goes back to before the last jump; :marks lists them.

Looks

KeysWhat they do
zlGo round the looks: calm, flat, depth.
zhSyntax colors on and off.
ziIcons on and off.
<Space>umMarkdown read view on and off. The line the cursor is on is always the file's own text.

git

KeysWhat they do
<Space>geThe tree with only the files that differ from HEAD; Enter opens HEAD's version read-only, and <Space>ge again (or q) goes back.
<Space>giSays again what the guard did to this repository: why git was not run, or which settings were turned off.

Mouse

KeysWhat they do
clickwheeldragClick to open or place the cursor, wheel to scroll, drag to select.

Changes from outside

KeysWhat they do
]c[cGo to the next or previous change from outside.
:seenClear the change marks.

Flags and environment

KeysWhat they do
sim --plainThe core alone: the calm look, one file, no panel, no external program. The default as root and as the editor of sudoedit.
sim --versionsim --helpPrint the usage and the environment sim reads, or the version, and exit.
NO_COLORNo color at all, also on terminals with fewer than 8 colors: weight, underline and inverse video say what color said.
SIM_ON_NORMALA command run each time you return to Normal mode, for example to turn an IME off. SI_ON_NORMAL, its old name, still works.

Key guidance

KeysWhat they do
<Space>The leader key. A pause on Space (or on g, z, [, ], an operator) opens a small window that lists the keys that can come next.
F1:helpA searchable list of every key and command, with what each does. :help tab finds Tab, Shift-Tab and <Space>bp.
<Space>bpPut a letter on each tab; the letter jumps to its file.
<Space>bcPick a tab by letter to close it. A modified file stays open.
:tutorAbout fifteen minutes of lessons in a scratch buffer, in your language; nothing is written.
sim showing notes/store.py. Near the bottom, a small window titled <Space>b lists three keys: p, pick a tab by letter; c, pick a tab to close; and k, where the other version went.
which-key: Space, then b, then a pause of 200 ms, and a small window lists the keys that can come next. Typing on works exactly as if it were not there, and Esc closes it.
sim showing the window Help · keys and commands, over the project tree and a Python file, with tab typed in its prompt. Six rows match: <Tab>, <S-Tab>, <Tab> in Insert mode, <Space>bp, <Space>bc and T{char}. The preview explains <Tab>, next file.
:help tab: every key and command in one searchable list, made from the same key table that which-key reads. The preview says what the selected key does. Enter and Esc close it and run nothing.

The complete list

The complete list is the product's own key table, sim/keys.tsv. The editor's :help, F1 and which-key read it, its tests check it against what the keys do, and the key guidance above is checked against it, so none of them can drift from the editor. :tutor is on the roadmap.