7> NOTE: `f`, `F`, `t` and `T` are not confined to the current line.
10| ----- | ----------- |
11| `h`, `Left` | Move left |
12| `j`, `Down` | Move down |
13| `k`, `Up` | Move up |
14| `l`, `Right` | Move right |
15| `w` | Move next word start |
16| `b` | Move previous word start |
17| `e` | Move next word end |
18| `W` | Move next WORD start |
19| `B` | Move previous WORD start |
20| `E` | Move next WORD end |
21| `t` | Find 'till next char |
22| `f` | Find next char |
23| `T` | Find 'till previous char |
24| `F` | Find previous char |
25| `Home` | Move to the start of the line |
26| `End` | Move to the end of the line |
27| `PageUp` | Move page up |
28| `PageDown` | Move page down |
29| `Ctrl-u` | Move half page up |
30| `Ctrl-d` | Move half page down |
31| `Ctrl-i` | Jump forward on the jumplist TODO: conflicts tab |
32| `Ctrl-o` | Jump backward on the jumplist |
33| `v` | Enter [select (extend) mode](#select--extend-mode) |
34| `g` | Enter [goto mode](#goto-mode) |
35| `m` | Enter [match mode](#match-mode) |
36| `:` | Enter command mode |
37| `z` | Enter [view mode](#view-mode) |
38| `Ctrl-w` | Enter [window mode](#window-mode) (maybe will be remove for spc w w later) |
39| `Space` | Enter [space mode](#space-mode) |
40| `K` | Show documentation for the item under the cursor |
45| ----- | ----------- |
46| `r` | Replace with a character |
47| `R` | Replace with yanked text |
48| `i` | Insert before selection |
49| `a` | Insert after selection (append) |
50| `I` | Insert at the start of the line |
51| `A` | Insert at the end of the line |
52| `o` | Open new line below selection |
53| `o` | Open new line above selection |
56| `y` | Yank selection |
57| `p` | Paste after selection |
58| `P` | Paste before selection |
59| `>` | Indent selection |
60| `<` | Unindent selection |
61| `=` | Format selection |
62| `d` | Delete selection |
63| `c` | Change selection (delete and enter insert mode) |
65### Selection manipulation
68| ----- | ----------- |
69| `s` | Select all regex matches inside selections |
70| `S` | Split selection into subselections on regex matches |
71| `Alt-s` | Split selection on newlines |
72| `;` | Collapse selection onto a single cursor |
73| `Alt-;` | Flip selection cursor and anchor |
74| `%` | Select entire file |
75| `x` | Select current line, if already selected, extend to next line |
76| `X` | Extend selection to line bounds (line-wise selection) |
77| | Expand selection to parent syntax node TODO: pick a key |
78| `J` | join lines inside selection |
79| `K` | keep selections matching the regex TODO: overlapped by hover help |
80| `Space` | keep only the primary selection TODO: overlapped by space mode |
81| `Ctrl-c` | Comment/uncomment the selections |
85> TODO: The search implementation isn't ideal yet -- we don't support searching
86in reverse, or searching via smartcase.
89| ----- | ----------- |
90| `/` | Search for regex pattern |
91| `n` | Select next search match |
92| `N` | Add next search match to selection |
93| `*` | Use current selection as the search pattern |
97> NOTE: `[` and `]` will likely contain more pair mappings in the style of
98> [vim-unimpaired](https://github.com/tpope/vim-unimpaired)
101| ----- | ----------- |
102| `[d` | Go to previous diagnostic |
103| `]d` | Go to next diagnostic |
104| `[D` | Go to first diagnostic in document |
105| `]D` | Go to last diagnostic in document |
107## Select / extend mode
109I'm still pondering whether to keep this mode or not. It changes movement
110commands to extend the existing selection instead of replacing it.
112> NOTE: It's a bit confusing at the moment because extend hasn't been
113> implemented for all movement commands yet.
117View mode is intended for scrolling and manipulating the view without changing
121| ----- | ----------- |
122| `z` , `c` | Vertically center the line |
123| `t` | Align the line to the top of the screen |
124| `b` | Align the line to the bottom of the screen |
125| `m` | Align the line to the middle of the screen (horizontally) |
126| `j` | Scroll the view downwards |
127| `k` | Scroll the view upwards |
131Jumps to various locations.
133> NOTE: Some of these features are only available with the LSP present.
136| ----- | ----------- |
137| `g` | Go to the start of the file |
138| `e` | Go to the end of the file |
139| `h` | Go to the start of the line |
140| `l` | Go to the end of the line |
141| `s` | Go to first non-whitespace character of the line |
142| `t` | Go to the top of the screen |
143| `m` | Go to the middle of the screen |
144| `b` | Go to the bottom of the screen |
145| `d` | Go to definition |
146| `y` | Go to type definition |
147| `r` | Go to references |
148| `i` | Go to implementation |
149| `a` | Go to the last accessed/alternate file |
153Enter this mode using `m` from normal mode. See the relavant section
154in [Usage](./usage.md) for an explanation about [surround](./usage.md#surround)
155and [textobject](./usage.md#textobject) usage.
158| ----- | ----------- |
159| `m` | Goto matching bracket |
160| `s` `<char>` | Surround current selection with `<char>` |
161| `r` `<from><to>` | Replace surround character `<from>` with `<to>` |
162| `d` `<char>` | Delete surround character `<char>` |
163| `a` `<object>` | Select around textobject |
164| `i` `<object>` | Select inside textobject |
168TODO: Mappings for selecting syntax nodes (a superset of `[`).
172This layer is similar to vim keybindings as kakoune does not support window.
175| ----- | ------------- |
176| `w`, `Ctrl-w` | Switch to next window |
177| `v`, `Ctrl-v` | Vertical right split |
178| `h`, `Ctrl-h` | Horizontal bottom split |
179| `q`, `Ctrl-q` | Close current window |
183This layer is a kludge of mappings I had under leader key in neovim.
186| ----- | ----------- |
187| `f` | Open file picker |
188| `b` | Open buffer picker |
189| `s` | Open symbol picker (current document) |
190| `w` | Enter [window mode](#window-mode) |
191| `space` | Keep primary selection TODO: it's here because space mode replaced it |
192| `p` | paste system clipboard after selections |
193| `P` | paste system clipboard before selections |
194| `y` | join and yank selections to clipboard |
195| `Y` | yank main selection to clipboard |
196| `R` | replace selections by clipboard contents |
200Keys to use within picker.
203| ----- | ------------- |
204| `Up`, `Ctrl-p` | Previous entry |
205| `Down`, `Ctrl-n` | Next entry |
206| `Ctrl-space` | Filter options |
207| `Enter` | Open selected |
208| `Ctrl-h` | Open horizontally |
209| `Ctrl-v` | Open vertically |
210| `Escape`, `Ctrl-c` | Close picker |
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list