on master help sign in
Format docs for better readability
eb77de6Gokul Soumya
book/src/configuration.md+53−53
@@ -26,62 +26,62 @@ if the key contains a dot `'.'`, it must be quoted to prevent it being parsed as
26
26
27Possible modifiers:
27Possible modifiers:
28
28
29−| modifier |
29+| Modifier |
30−| --- |
30+| --- |
31−| bold |
31+| `bold` |
32−| dim |
32+| `dim` |
33−| italic |
33+| `italic` |
34−| underlined |
34+| `underlined` |
35−| slow\_blink |
35+| `slow\_blink` |
36−| rapid\_blink |
36+| `rapid\_blink` |
37−| reversed |
37+| `reversed` |
38−| hidden |
38+| `hidden` |
39−| crossed\_out |
39+| `crossed\_out` |
40
40
41Possible keys:
41Possible keys:
42
42
43−| key | notes |
43+| Key | Notes |
44−| --- | --- |
44+| --- | --- |
45−| attribute | |
45+| `attribute` | |
46−| keyword | |
46+| `keyword` | |
47−| keyword.directive | preprocessor directives (\#if in C) |
47+| `keyword.directive` | Preprocessor directives (\#if in C) |
48−| namespace | |
48+| `namespace` | |
49−| punctuation | |
49+| `punctuation` | |
50−| punctuation.delimiter | |
50+| `punctuation.delimiter` | |
51−| operator | |
51+| `operator` | |
52−| special | |
52+| `special` | |
53−| property | |
53+| `property` | |
54−| variable | |
54+| `variable` | |
55−| variable.parameter | |
55+| `variable.parameter` | |
56−| type | |
56+| `type` | |
57−| type.builtin | |
57+| `type.builtin` | |
58−| constructor | |
58+| `constructor` | |
59−| function | |
59+| `function` | |
60−| function.macro | |
60+| `function.macro` | |
61−| function.builtin | |
61+| `function.builtin` | |
62−| comment | |
62+| `comment` | |
63−| variable.builtin | |
63+| `variable.builtin` | |
64−| constant | |
64+| `constant` | |
65−| constant.builtin | |
65+| `constant.builtin` | |
66−| string | |
66+| `string` | |
67−| number | |
67+| `number` | |
68−| escape | escaped characters |
68+| `escape` | Escaped characters |
69−| label | used for lifetimes |
69+| `label` | For lifetimes |
70−| module | |
70+| `module` | |
71−| ui.background | |
71+| `ui.background` | |
72−| ui.linenr | |
72+| `ui.linenr` | |
73−| ui.statusline | |
73+| `ui.statusline` | |
74−| ui.popup | |
74+| `ui.popup` | |
75−| ui.window | |
75+| `ui.window` | |
76−| ui.help | |
76+| `ui.help` | |
77−| ui.text | |
77+| `ui.text` | |
78−| ui.text.focus | |
78+| `ui.text.focus` | |
79−| ui.menu.selected | |
79+| `ui.menu.selected` | |
80−| ui.selection | for selections in the editing area |
80+| `ui.selection` | For selections in the editing area |
81−| warning | LSP warning |
81+| `warning` | LSP warning |
82−| error | LSP error |
82+| `error` | LSP error |
83−| info | LSP info |
83+| `info` | LSP info |
84−| hint | LSP hint |
84+| `hint` | LSP hint |
85
85
86These keys match [tree-sitter scopes](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme). We half-follow the common scopes from [macromates language grammars](https://macromates.com/manual/en/language_grammars) with some differences.
86These keys match [tree-sitter scopes](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme). We half-follow the common scopes from [macromates language grammars](https://macromates.com/manual/en/language_grammars) with some differences.
87
87
book/src/keymap.md+123−121
@@ -4,100 +4,102 @@
4
4
5### Movement
5### Movement
6
6
7+> NOTE: `f`, `F`, `t` and `T` are not confined to the current line.
8+
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 |
36
38
37### Changes
39### Changes
38
40
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) |
59
61
60### Selection manipulation
62### Selection manipulation
61
63
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 |
77
79
78### Search
80### Search
79
81
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.
82
84
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 |
89
91
90### Diagnostics
92### Diagnostics
91
93
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)
94
96
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 |
101
103
102## Select / extend mode
104## Select / extend mode
103
105
@@ -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.
114
116
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 |
123
125
124## Goto mode
126## Goto mode
125
127
@@ -127,21 +129,21 @@ Jumps to various locations.
127
129
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.
129
131
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 |
145
147
146## Object mode
148## Object mode
147
149
@@ -151,35 +153,35 @@ TODO: Mappings for selecting syntax nodes (a superset of `[`).
151
153
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.
153
155
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 |
160
162
161## Space mode
163## Space mode
162
164
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.
164
166
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 |
172
174
173# Picker
175# Picker
174
176
175Keys to use within picker.
177Keys to use within picker.
176
178
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 |