VS Code vs Vim Keyboard Shortcuts — Side-by-Side Comparison

VS Code and Vim are philosophically different: VS Code uses GUI-first shortcuts, Vim uses a modal command language. But they accomplish the same tasks. This comparison maps every common editing action side-by-side — useful whether you're learning Vim from VS Code or installing the Vim extension in VS Code.

Action
VS Code
Vim
Undo
Ctrl+Z
u
Redo
Ctrl+Shift+Z
Ctrl+R
Copy Line
Ctrl+C (no selection)
yy
Cut Line
Ctrl+X (no selection)
dd
Paste
Ctrl+V
p (after), P (before)
Delete Line
Ctrl+Shift+K
dd
Duplicate Line
Alt+Shift+↓
yyp
Move Line Down / Up
Alt+↓ / ↑
ddp / ddkP
Select All
Ctrl+A
ggVG
Indent / Outdent
Tab / Shift+Tab
>> / <<
Comment Line
Ctrl+/
gcc (with commentary plugin)
Join Lines
None (edit → join)
J

Frequently Asked Questions

Can I use Vim shortcuts inside VS Code?+
Yes — install the 'Vim' extension by vscodevim from the VS Code Marketplace. It brings full modal editing (Normal, Insert, Visual modes) along with most Vim keybindings including text objects, registers, and macros, while keeping VS Code's IntelliSense and UI.
Which is faster — VS Code or Vim?+
For pure text editing speed, experienced Vim users are typically faster because Vim's composable command grammar (e.g., d3w to delete 3 words, ci' to change text inside quotes) eliminates mouse use entirely. VS Code's multi-cursor editing and GUI integration make it faster for navigation-heavy tasks like jumping between files in a large project.
How do I exit Vim when I'm used to VS Code?+
Press Escape to ensure you're in Normal mode, then type :q and press Enter to quit. If you have unsaved changes, :q will fail — use :wq to save and quit, or :q! to discard changes and force quit.

See Also

More Comparisons