Skip to content

Commit 4c63d21

Browse files
stevenguhmarcoieni
andcommitted
Document issue where , can't find previous match (#38)
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
1 parent bc7b618 commit 4c63d21

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

docs/major-mode.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ title: Major Mode
66
Major mode offers dynamic menu and functions based on the active buffer.
77
You can access key bindings specific to the current major mode by pressing `<spc> m` or `,` if you want to save one keystroke.
88

9-
:::note
9+
:::tip
1010
If `,` isn't bound, you might need to update your settings.
1111
You can add the necessary keybindings to your `settings.json` by pressing `Ctrl+Shift+p` and running the command "VSpaceCode: Configure Default Settings".
12-
More information can be found in the [Installation](./) instructions.
12+
More information can be found in the [Installation](./) for instructions.
13+
:::
14+
15+
:::note
16+
The default configuration uses `,` as the shortcut to major mode, that will override the vim "find previous match" after a `f{character}`.
17+
You can follow the instructions in [Troubleshooting](./troubleshooting#-cannot-find-previous-match) to remove or modify this shortcut.
1318
:::
1419

1520
For example, you can press `<spc> m x b` to make the text bold in a markdown buffer.

docs/troubleshooting.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ If you don't use this feature, disabling it should fix this issue. Otherwise, ad
2525
],
2626
```
2727

28+
## `,` cannot find previous match
29+
30+
The default VSpaceCode configuration overrides `,` as a shortcut for the [major mode](./major-mode.md);
31+
therefore, the key `,` cannot get back to the previous match after a find `f{character}` with Vim.
32+
33+
In order to remove this major mode shortcut, remove the following section from your `settings.json`:
34+
35+
```json
36+
{
37+
"before": [","],
38+
"commands": [
39+
"vspacecode.space",
40+
{
41+
"command": "whichkey.triggerKey",
42+
"args": "m"
43+
}
44+
],
45+
}
46+
```
47+
48+
Alternatively, you can change the shortcut key by changing `","` in `"before"` to other keys.
49+
2850
## Unresponsive menu activation
2951

3052
If you press `<spc>` on a buffer and the which-key menu doesn't appear immediately, you might have one of the following problems.

0 commit comments

Comments
 (0)