This simple extension enables new basic, but very handy, shortcuts much like Vim's in your VS Code environment. With these new shortcuts, your hands just need to remain in the Main Focus Area in the figure below.
See the simple navigations in this screen capture:
🍎 Nothing would change with your existing shortcuts. These are just new ones that is added to your environment settings. Anyway, you can always disable the extension using the Extensions view (Ctrl+Shift+X).
Action | Shortcut | New alternative shortcut |
---|---|---|
Cursor/item left | Left | Ctrl+Cmd+H |
Cursor/item down | Down | Ctrl+Cmd+J |
Cursor/item up | Up | Ctrl+Cmd+K |
Cursor/item right | Right | Ctrl+Cmd+L |
Word left | Ctrl+Left | Ctrl+Cmd+Alt+H |
Word down | Ctrl+Down | Ctrl+Cmd+Alt+J |
Word up | Ctrl+Up | Ctrl+Cmd+Alt+K |
Word right | Ctrl+Right | Ctrl+Cmd+Alt+L |
Move to line beginning | Home | Ctrl+Alt+0 |
Move to line end | End | Ctrl+Alt+4 |
Delete previous | Backspace | Ctrl+Cmd+Space |
Delete previous | Backspace | Ctrl+Cmd+Shift+X |
Delete next | Del | Ctrl+Cmd+Shift+Space |
Delete next | Del | Ctrl+Cmd+X |
New line | Enter | Ctrl+Cmd+M |
Escape/cancel | Escape | Ctrl+Cmd+[ |
Page down | PageDown | Ctrl+Cmd+F |
Page down | PageDown | Ctrl+Cmd+D |
Page up | PageUp | Ctrl+Cmd+B |
Page up | PageUp | Ctrl+Cmd+U |
Top | Ctrl+Home | Ctrl+Cmd+G (press twice) |
Bottom | Ctrl+End | Ctrl+Shift+Cmd+G |
Next editor | Ctrl+PageDown | Ctrl+Cmd+W, then L |
Ctrl+Cmd+W (press twice) | ||
Previous editor | Ctrl+PageUp | Ctrl+Cmd+W, then H |
Ctrl+Cmd+Shift+W (press twice) | ||
Focus bottom editor group | - | Ctrl+Cmd+W, then J |
Focus top editor group | - | Ctrl+Cmd+W, then K |
Next terminal | Ctrl+PageDown | Ctrl+Cmd+W, then L |
Ctrl+Cmd+W (press twice) | ||
Previous terminal | Ctrl+PageUp | Ctrl+Cmd+W, then H |
Ctrl+Cmd+Shift+W (press twice) | ||
Debug console history: Previous | Up | Ctrl+Cmd+K |
Debug console history: Next | Down | Ctrl+Cmd+J |
👍 You can also use these shortcuts on file explorer, sidebar lists/trees (e.g., find in files or source control,) auto-completion lists and breadcrumbs.
👍 Hold Shift and/or Alt keys with these shortcuts to select text or move by word.
👍 Hold Alt keys with delete next/previous shortcuts to delete by word.
👍 To use shortcuts on the command palette lists, you need to first press Tab key to focus on the list.
Want to manually set the shortcuts? Just open this Gist and follow the instructions at the top of the file.
- "Basic Vim Shortcuts in VS Code" on
DEV.to
- Manual configuration guide on
gist.github.com