@@ -4,100 +4,102 @@
5### Movement
5### Movement
7+> NOTE: `f`, `F`, `t` and `T` are not confined to the current line.
7−| Key | Description |
9+| Key | Description |
8−|-----|-----------|
10+| ----- | ----------- |
9−| h, Left | move left |
11+| `h`, `Left` | Move left |
10−| j, Down | move down |
12+| `j`, `Down` | Move down |
11−| k, Up | move up |
13+| `k`, `Up` | Move up |
12−| l, Right | move right |
14+| `l`, `Right` | Move right |
13−| w | move next word start |
15+| `w` | Move next word start |
14−| b | move previous word start |
16+| `b` | Move previous word start |
15−| e | move next word end |
17+| `e` | Move next word end |
16−| t | find 'till next char |
18+| `t` | Find 'till next char |
17−| f | find next char |
19+| `f` | Find next char |
18−| T | find 'till previous char |
20+| `T` | Find 'till previous char |
19−| F | find previous char |
21+| `F` | Find previous char |
20−| Home | move to the start of the line |
22+| `Home` | Move to the start of the line |
21−| End | move to the end of the line |
23+| `End` | Move to the end of the line |
22−| m | Jump to matching bracket |
24+| `m` | Jump to matching bracket |
23−| PageUp | Move page up |
25+| `PageUp` | Move page up |
24−| PageDown | Move page down |
26+| `PageDown` | Move page down |
25−| ctrl-u | Move half page up |
27+| `Ctrl-u` | Move half page up |
26−| ctrl-d | Move half page down |
28+| `Ctrl-d` | Move half page down |
27−| ctrl-i | Jump forward on the jumplist TODO: conflicts tab |
29+| `Ctrl-i` | Jump forward on the jumplist TODO: conflicts tab |
28−| ctrl-o | Jump backward on the jumplist |
30+| `Ctrl-o` | Jump backward on the jumplist |
29−| v | Enter select (extend) mode |
31+| `v` | Enter [select (extend) mode](#select--extend-mode) |
30−| g | Enter goto mode |
32+| `g` | Enter [goto mode](#goto-mode) |
31−| : | Enter command mode |
33+| `:` | Enter command mode |
32−| z | Enter view mode |
34+| `z` | Enter [view mode](#view-mode) |
33−| ctrl-w | Enter window mode (maybe will be remove for spc w w later) |
35+| `Ctrl-w` | Enter [window mode](#window-mode) (maybe will be remove for spc w w later) |
34−| space | Enter space mode |
36+| `Space` | Enter [space mode](#space-mode) |
35−| K | Show documentation for the item under the cursor |
37+| `K` | Show documentation for the item under the cursor |
37### Changes
39### Changes
39−| Key | Description |
41+| Key | Description |
40−|-----|-----------|
42+| ----- | ----------- |
41−| r | replace with a character |
43+| `r` | Replace with a character |
42−| R | replace with yanked text |
44+| `R` | Replace with yanked text |
43−| i | Insert before selection |
45+| `i` | Insert before selection |
44−| a | Insert after selection (append) |
46+| `a` | Insert after selection (append) |
45−| I | Insert at the start of the line |
47+| `I` | Insert at the start of the line |
46−| A | Insert at the end of the line |
48+| `A` | Insert at the end of the line |
47−| o | Open new line below selection |
49+| `o` | Open new line below selection |
48−| o | Open new line above selection |
50+| `o` | Open new line above selection |
49−| u | Undo change |
51+| `u` | Undo change |
50−| U | Redo change |
52+| `U` | Redo change |
51−| y | Yank selection |
53+| `y` | Yank selection |
52−| p | Paste after selection |
54+| `p` | Paste after selection |
53−| P | Paste before selection |
55+| `P` | Paste before selection |
54−| > | Indent selection |
56+| `>` | Indent selection |
55−| < | Unindent selection |
57+| `<` | Unindent selection |
56−| = | Format selection |
58+| `=` | Format selection |
57−| d | Delete selection |
59+| `d` | Delete selection |
58−| c | Change selection (delete and enter insert mode) |
60+| `c` | Change selection (delete and enter insert mode) |
60### Selection manipulation
62### Selection manipulation
62−| Key | Description |
64+| Key | Description |
63−|-----|-----------|
65+| ----- | ----------- |
64−| s | Select all regex matches inside selections |
66+| `s` | Select all regex matches inside selections |
65−| S | Split selection into subselections on regex matches |
67+| `S` | Split selection into subselections on regex matches |
66−| alt-s | Split selection on newlines |
68+| `Alt-s` | Split selection on newlines |
67−| ; | Collapse selection onto a single cursor |
69+| `;` | Collapse selection onto a single cursor |
68−| alt-; | Flip selection cursor and anchor |
70+| `Alt-;` | Flip selection cursor and anchor |
69−| % | Select entire file |
71+| `%` | Select entire file |
70−| x | Select current line |
72+| `x` | Select current line |
71−| X | Extend to next line |
73+| `X` | Extend to next line |
72−| [ | Expand selection to parent syntax node TODO: pick a key |
74+| `[` | Expand selection to parent syntax node TODO: pick a key |
73−| J | join lines inside selection |
75+| `J` | join lines inside selection |
74−| K | keep selections matching the regex TODO: overlapped by hover help |
76+| `K` | keep selections matching the regex TODO: overlapped by hover help |
75−| space | keep only the primary selection TODO: overlapped by space mode |
77+| `Space` | keep only the primary selection TODO: overlapped by space mode |
76−| ctrl-c | Comment/uncomment the selections |
78+| `Ctrl-c` | Comment/uncomment the selections |
80> TODO: The search implementation isn't ideal yet -- we don't support searching
82> TODO: The search implementation isn't ideal yet -- we don't support searching
81in reverse, or searching via smartcase.
83in reverse, or searching via smartcase.
83−| Key | Description |
85+| Key | Description |
84−|-----|-----------|
86+| ----- | ----------- |
85−| / | Search for regex pattern |
87+| `/` | Search for regex pattern |
86−| n | Select next search match |
88+| `n` | Select next search match |
87−| N | Add next search match to selection |
89+| `N` | Add next search match to selection |
88−| * | Use current selection as the search pattern |
90+| `*` | Use current selection as the search pattern |
90### Diagnostics
92### Diagnostics
92> NOTE: `[` and `]` will likely contain more pair mappings in the style of
94> NOTE: `[` and `]` will likely contain more pair mappings in the style of
93> [vim-unimpaired](https://github.com/tpope/vim-unimpaired)
95> [vim-unimpaired](https://github.com/tpope/vim-unimpaired)
95−| Key | Description |
97+| Key | Description |
96−|-----|-----------|
98+| ----- | ----------- |
97−| [d | Go to previous diagnostic |
99+| `[d` | Go to previous diagnostic |
98−| ]d | Go to next diagnostic |
100+| `]d` | Go to next diagnostic |
99−| [D | Go to first diagnostic in document |
101+| `[D` | Go to first diagnostic in document |
100−| ]D | Go to last diagnostic in document |
102+| `]D` | Go to last diagnostic in document |
102## Select / extend mode
104## Select / extend mode
@@ -112,14 +114,14 @@ commands to extend the existing selection instead of replacing it.
112View mode is intended for scrolling and manipulating the view without changing
114View mode is intended for scrolling and manipulating the view without changing
113the selection.
115the selection.
115−| Key | Description |
117+| Key | Description |
116−|-----|-----------|
118+| ----- | ----------- |
117−| z , c | Vertically center the line |
119+| `z` , `c` | Vertically center the line |
118−| t | Align the line to the top of the screen |
120+| `t` | Align the line to the top of the screen |
119−| b | Align the line to the bottom of the screen |
121+| `b` | Align the line to the bottom of the screen |
120−| m | Align the line to the middle of the screen (horizontally) |
122+| `m` | Align the line to the middle of the screen (horizontally) |
121−| j | Scroll the view downwards |
123+| `j` | Scroll the view downwards |
122−| k | Scroll the view upwards |
124+| `k` | Scroll the view upwards |
124## Goto mode
126## Goto mode
@@ -127,21 +129,21 @@ Jumps to various locations.
128> NOTE: Some of these features are only available with the LSP present.
130> NOTE: Some of these features are only available with the LSP present.
130−| Key | Description |
132+| Key | Description |
131−|-----|-----------|
133+| ----- | ----------- |
132−| g | Go to the start of the file |
134+| `g` | Go to the start of the file |
133−| e | Go to the end of the file |
135+| `e` | Go to the end of the file |
134−| h | Go to the start of the line |
136+| `h` | Go to the start of the line |
135−| l | Go to the end of the line |
137+| `l` | Go to the end of the line |
136−| s | Go to first non-whitespace character of the line |
138+| `s` | Go to first non-whitespace character of the line |
137−| t | Go to the top of the screen |
139+| `t` | Go to the top of the screen |
138−| m | Go to the middle of the screen |
140+| `m` | Go to the middle of the screen |
139−| b | Go to the bottom of the screen |
141+| `b` | Go to the bottom of the screen |
140−| d | Go to definition |
142+| `d` | Go to definition |
141−| y | Go to type definition |
143+| `y` | Go to type definition |
142−| r | Go to references |
144+| `r` | Go to references |
143−| i | Go to implementation |
145+| `i` | Go to implementation |
144−| a | Go to the last accessed/alternate file |
146+| `a` | Go to the last accessed/alternate file |
146## Object mode
148## Object mode
@@ -151,35 +153,35 @@ TODO: Mappings for selecting syntax nodes (a superset of `[`).
152This layer is similar to vim keybindings as kakoune does not support window.
154This layer is similar to vim keybindings as kakoune does not support window.
154−| Key | Description |
156+| Key | Description |
155−|-----|-------------|
157+| ----- | ------------- |
156−| w, ctrl-w | Switch to next window |
158+| `w`, `ctrl-w` | Switch to next window |
157−| v, ctrl-v | Vertical right split |
159+| `v`, `ctrl-v` | Vertical right split |
158−| h, ctrl-h | Horizontal bottom split |
160+| `h`, `ctrl-h` | Horizontal bottom split |
159−| q, ctrl-q | Close current window |
161+| `q`, `ctrl-q` | Close current window |
161## Space mode
163## Space mode
163This layer is a kludge of mappings I had under leader key in neovim.
165This layer is a kludge of mappings I had under leader key in neovim.
165−| Key | Description |
167+| Key | Description |
166−|-----|-----------|
168+| ----- | ----------- |
167−| f | Open file picker |
169+| `f` | Open file picker |
168−| b | Open buffer picker |
170+| `b` | Open buffer picker |
169−| s | Open symbol picker (current document)|
171+| `s` | Open symbol picker (current document) |
170−| w | Enter window mode |
172+| `w` | Enter [window mode](#window-mode) |
171−| space | Keep primary selection TODO: it's here because space mode replaced it |
173+| `space` | Keep primary selection TODO: it's here because space mode replaced it |
175Keys to use within picker.
177Keys to use within picker.
177−| Key | Description |
179+| Key | Description |
178−|-----|-------------|
180+| ----- | ------------- |
179−| up, ctrl-p | Previous entry |
181+| `Up`, `Ctrl-p` | Previous entry |
180−| down, ctrl-n | Next entry |
182+| `Down`, `Ctrl-n` | Next entry |
181−| ctrl-space | Filter options |
183+| `Ctrl-space` | Filter options |
182−| enter | Open selected |
184+| `Enter` | Open selected |
183−| ctrl-h | Open horizontally |
185+| `Ctrl-h` | Open horizontally |
184−| ctrl-v | Open vertically |
186+| `Ctrl-v` | Open vertically |
185−| escape, ctrl-c | Close picker |
187+| `Escape`, `ctrl-c` | Close picker |