Skip to content

Commit

Permalink
Added documentation for all Vim Modes (#6945)
Browse files Browse the repository at this point in the history
Fixes #5273
  • Loading branch information
w-cantin authored Aug 31, 2021
1 parent c0474b3 commit ad98412
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,32 @@ Custom remappings are defined on a per-mode basis.

As you press the key that you are trying to remap, do you see it outputted here? If not, it means we don't subscribe to those key events.

### Vim modes

Here are all the modes used by VSCodeVim:

| Mode |
| --------------------- |
| Normal |
| Insert |
| Visual |
| VisualBlock |
| VisualLine |
| SearchInProgressMode |
| CommandlineInProgress |
| Replace |
| EasyMotionMode |
| EasyMotionInputMode |
| SurroundInputMode |
| OperatorPendingMode |
| Disabled |

When rebinding keys in [keybindings.json](https://code.visualstudio.com/docs/getstarted/keybindings) using ["when clause context"](https://code.visualstudio.com/api/references/when-clause-contexts), it can be useful to know in which mode vim currently is. For example to write a "when clause" that checks if vim is currently in normal mode or visual mode it is possible to write the following:

```json
"when": "vim.mode == 'Normal' || vim.mode == 'Visual'",
```

### Vim settings

Configuration settings that have been copied from vim. Vim settings are loaded in the following sequence:
Expand Down

0 comments on commit ad98412

Please sign in to comment.