Start
Coming from Neovim
Neovim with no configuration (nvim -u NONE) is strop's specification for keys: the same keys should leave the same text, cursor and registers. This page says where that holds, where strop does something else on purpose, and what is not there.
What works
The everyday editing language is there, and it is checked against Neovim rather than against memory:
- Operators with every motion and text object, with and without a count, in Normal and Visual, and repeated with
.. That includesgUgug~g?!, theipitgnobjects, andv/Vbetween an operator and its motion. - Registers by Vim's rules:
"0,"1–"9,"-,"Ato append,"_, the read-only ones, and macros as register content.Ctrl-Rpastes a register in every text field, not only in Insert mode. - Marks, the jump list and the change list; character, line and block Visual;
Ctrl-A/Ctrl-X; Replace mode. - The
:line with Vim's ranges and abbreviations::swith&,\1and thecflag,:g,:v,:norm,:m,:t,:d,:y,:sort,:b,:ls,:wa,:cd. - Window commands on
Ctrl-W, tab pages (gt,:tab split,Ctrl-W T), quickfix commands (:copen,:cnext,:cdo,:cfdo), and a terminal that behaves like Neovim's, down toCtrl-\ Ctrl-N.
How it is checked: before a release, about 4,000 key sequences are typed into both editors and the resulting text, cursor, mode and registers are compared. The few cases where strop knowingly differs are listed with a reason; everything else has to match. More on that.
The full keymap is generated from the binary's command table, by section:
- Moving43 rows
- Editing44 rows
- Insert11 rows
- Visual43 rows
- Search7 rows
- Leader (space)24 rows
- Panes13 rows
- Git22 rows
- Folder5 rows
- Pickers12 rows
- Terminal7 rows
- Command line26 rows
- Command line: text25 rows
- Command line: buffers5 rows
- Command line: files and windows23 rows
- Command line: tab pages9 rows
- Command line: strop21 rows
- Search patterns0 rows
What differs
These are deliberate.
- No configuration language and no plugins. There is no
init.lua, no Vimscript and no plugin manager. What plugins usually add is in the binary.strop configprints the handful of settings there are. Spaceis the leader, and its keys are fixed.Space ffinds files,Space /searches,Space gis git.Space ?lists them all. You cannot remap keys yet.- Search is smart-case.
/edgefindsEdge; a capital letter in the pattern makes case count, and\c/\Cdecide outright.:sis case-sensitive, as in Vim. - A plain yank reaches the system clipboard.
ywith no register also copies; deletes, changes and named registers do not. - The project is the directory you started in. It does not follow the current file.
:cdchanges it. - Language-server keys follow Neovim 0.11:
grrreferences,grnrename.gdasks the language server instead of searching the buffer. - Two commands show their range while you type them:
d/patternhighlights what it will delete until you press Enter, and:sshows the changed lines before and after.
Keys that do something else
Neovim binds these; strop uses the key for something different.
- Normal:
space— Neovim: move right. strop: the leader. - Normal:
Q— Neovim: replay the last recorded register. strop: plant a cursor that stays while motions move the main one; Esc ends planting (@@replays). - Normal:
gd gD— Neovim: go to the local or global declaration by search. strop: language-server definition and declaration. - Normal:
gI— Neovim: insert in column 1. strop: language-server implementation. - Normal:
gr— Neovim: replace with a virtual character (gr{char}). strop: only the prefix of the language-server keysgrrgrngragri. - Normal:
gs— Neovim: sleep. strop: switch between source and header. - Normal:
m— Neovim: set a mark. strop: the match prefix (msmrmdadd, replace and delete a surrounding pair,mmthe matching bracket,mimaselect inside and around); marks are set withgm. - Normal:
gm— Neovim: go to the middle of the screen line. strop: set a mark (gm{a-z});'and`jump to it. - Visual:
m— Neovim: set a mark. strop: the match prefix (mswraps the selection,mimaselect an object); marks are set withgm. - Visual:
ctrl-c— Neovim: leave Visual. strop: toggle comments on the selected lines (Escleaves). - Insert:
ctrl-e ctrl-y— Neovim: insert the character below or above. strop: dismiss or accept the completion menu.
What is missing
Beyond plugins and scripting, these Neovim keys do nothing in strop. An operator on the list (=, gq, gw, zf) still takes its motion and then says it is not supported, so the motion's keys never run as commands by accident.
- Normal:
zfjzozczazRzMzjzkzd— folds - Normal:
U— undo every change on the line - Normal:
===j=ip— the reindent operator - Normal:
gqqgqipgwip— reflow text to the text width - Normal:
disdas— the sentence text objects - Normal:
gag8— show the character under the cursor as a code - Normal:
gxgfgF— open the URL or file name under the cursor - Normal:
gR— virtual replace mode - Normal:
K— look the word under the cursor up (hover isspace k) - Normal:
][[]]m[m— section-end and method motions - Normal:
z=zg]s[s— spelling - Normal:
gMgo— middle of the line, byte offset - Normal:
zhzlzHzLzezs— horizontal scrolling - Normal:
dodp— diff mode - Normal:
ctrl-w xctrl-w rctrl-w Hctrl-w Jctrl-w Kctrl-w Lctrl-w +ctrl-w -ctrl-w _ctrl-w |— move, rotate and resize windows (panes are always equal) - Visual:
=gqgwzf— reindent, reflow and fold the selection - Insert:
ctrl-vctrl-kctrl-a— insert a literal key, a digraph, the last inserted text - Ex:
:fold:mksession:digraphs— folds, session files, digraphs - Ex:
:tabs:tabdo:tabfind:tcd— list tab pages, run a command in each, find into one, a directory per tab page
Also not there: key remapping, autocommands, folds, spell checking, digraphs, diff mode, and builds for anything but Linux and WSL on x86_64. If one of these is what you live in, strop is not ready for you yet.
The section list and the lists of missing and reassigned keys on this page are generated from docs/vim-compat.md at v0.80.0, which the binary prints with strop compat.