Vim (aka. VSCodeVim) is a Visual Studio Code extension that enables the power of the Vim keybinding experience within Visual Studio Code.
- Within Visual Studio Code, open the command palette (
Ctrl-Shift-P
/Cmd-Shift-P
) - Select
Install Extension
and search for 'vim' or runext install vim
Adjust configurations through user settings (File -> Preferences -> User Settings).
- vim.keyboardLayout:
- Supported Values:
en-US (QWERTY)
(default),es-ES (QWERTY)
,de-DE (QWERTZ)
,da-DK (QWERTY)
- Supported Values:
Check out our release notes for more notes. The tables below are obviously an incomplete list, but show, at a glance, the current commands supported:
Status | Key | Description |
---|---|---|
✅ | Esc | end Insert mode, back to Normal mode |
✅ | Ctrl+[ |
Command Mode |
Status | Key | Description |
---|---|---|
✅ | : | Open command palette |
✅ | :q | Quit current buffer, unless changes have been made. Exit Vim when there are no other non-help buffers |
✅ | :w | Write the current file and exit. |
Status | Key | Description |
---|---|---|
✅ | h | left (also: CTRL-H, , or key) |
✅ | l | right (also: or key) |
✅ | 0 | to first character in the line (also: key) |
✅ | ^ | to first non-blank character in the line |
✅ | $ | to the last character in the line (N-1 lines lower) |
| g0 | to first character in screen line (differs from "0" when lines wrap)
| g^ | to first non-blank character in screen line (differs from "^" when lines wrap)
| g$ | to last character in screen line (differs from "$" when lines wrap)
| | | to column N (default: 1)
| f<char> | to the Nth occurrence of <char> to the right
| F<char> | to the Nth occurrence of <char> to the left
| t<char> | till before the Nth occurrence of <char> to the right
| T<char> | till before the Nth occurrence of <char> to the left
| ; | repeat the last "f", "F", "t", or "T" N times
| , | repeat the last "f", "F", "t", or "T" N times in opposite direction
Status | Key | Description |
---|---|---|
✅ | k | up (also: CTRL-P and ) |
✅ | j | down (also: CTRL-J, CTRL-N, , and ) |
| - | up, on the first non-blank character
| + | down, on the first non-blank character (also: CTRL-M and <CR>)
| _ | down N-1 lines, on the first non-blank character
✅ | G | goto last line, on the first non-blank character
✅ | gg | goto frst line, on the firstnon-blank character
| % | goto line N percentage down in the file. N must be given, otherwise it is the % command.
matching brace | % | jump to matching brace, C-style comment, C/C++ preprocessor conditional
| gk | up N screen lines (differs from "k" when line wraps)
| gj | down N screen lines (differs from "j" when line wraps)
:white_check_mark: | CTRL-F | page down
:white_check_mark: | CTRL-B | page up
Status | Key | Description |
---|---|---|
✅ | w | words forward |
✅ | W | N blank-separated WORDS forward |
✅ | e | forward to the end of the word |
✅ | E | forward to the end of the Nth blank-separated WORD |
✅ | b | words backward |
✅ | B | N blank-separated WORDS backward |
| ge | backward to the end of the Nth word
| gE | backward to the end of the Nth blank-separated WORD
Status | Key | Description |
---|---|---|
✅ | a | append text after the cursor |
✅ | A | append text at the end of the line (N times) |
✅ | i | insert text before the cursor (N times) (also: ) |
✅ | I | insert text before the first non-blank in the line (N times) |
✅ | o | open a new line below the current line, append text (N times) |
✅ | O | open a new line above the current line, append text (N times) |
Status | Key | Description |
---|---|---|
✅ | x | delete characters under and after the cursor |
| <Del> | delete N characters under and after the cursor
✅ | X | delete N characters before the cursor dw, db | d{motion} | delete the text that is moved over with {motion} | {visual}d | delete the highlighted text ✅ | dd | delete N lines | D | delete to end-of-line (and N-1 more lines) | J | join N-1 lines (delete newlines) | {visual}J | join the highlighted lines
Status | Key | Description |
---|---|---|
✅ | << | move N lines one shiftwidth left |
✅ | >> | move N lines one shiftwidth right |
Status | Key | Description |
---|---|---|
✅ | u | undo last change |
✅ | CTRL-R | redo last undone change |
| U | restore last changed line
This project is maintained by a group of awesome contributors. Thank you! ❤️