Enhanced VS Code configuration with Vim keybindings for efficient coding workflows. This setup combines the power of Vim motions with VS Code's modern features.
IMPROTANT: Some of the shortcuts are experimental and I am trying things on the go so they might not work at all or as intended! Please leave a comment and feel free to adjust and fix!
- Vim-style split navigation (
ctrl+h/j/k/l) - Quick file switching with
alt+[andalt+] - Efficient split management with
alt+h/lfor resizing - Enhanced bracket navigation with colorization
- Improved minimap visibility
- Toggle sidebar:
<leader>e - File navigation with Vim keys
- Quick file operations (rename, create, delete)
- Enhanced workspace search with
<leader>s w - Find in files:
ctrl+shift+f - Navigate results:
F4/Shift+F4 - Custom search highlighting
- Format document:
ctrl+space f - Go to definition:
ctrl+] - Navigate back:
ctrl+t
- Toggle blame:
<leader>g b - Quick stage:
<leader>g s - Pull:
<leader>g p - Push:
<leader>g P - View history:
<leader>g h
- Toggle terminal:
ctrl+; - Maximize terminal:
ctrl+shift+; - Create new terminal:
<leader>t n
- Sort lines:
<leader>s s - Transform to uppercase:
<leader>u - Transform to lowercase:
<leader>l - Select all occurrences:
<leader>a
- Mode-specific colors
- Visual mode indicators
- Clear status feedback
- Custom color schemes for each mode
-
Open VS Code settings.json:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "settings json"
- Click "Preferences: Open User Settings (JSON)"
- Clear the file and paste the content from
settings.json
- Press
-
Open VS Code keybindings.json:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "keyboard json"
- Click "Preferences: Open Keyboard Shortcuts (JSON)"
- Clear the file and paste the content from
keybindings.json
- Press
-
Install required extensions from VS Code Marketplace
-
Restart VS Code
Alternative ways to open configuration files:
- Settings:
- Mac:
Cmd+,then click the "Open Settings (JSON)" icon in the top right - Windows/Linux:
Ctrl+,then click the "Open Settings (JSON)" icon in the top right
- Mac:
- Keybindings:
- Mac:
Cmd+K Cmd+Sthen click the "Open Keyboard Shortcuts (JSON)" icon - Windows/Linux:
Ctrl+K Ctrl+Sthen click the "Open Keyboard Shortcuts (JSON)" icon
- Mac:
- Leader key is set to
<space> - Consistent use of Vim navigation patterns
- Integration with VS Code's native features
- Enhanced terminal and git workflows
- Visual feedback through status line colors
- Open sidebar:
<leader>e - Navigate files:
j/k - Expand/collapse:
l/h - Open in split:
ctrl+shift+1/2
- Stage changes:
<leader>g s - View changes:
<leader>g d - Push changes:
<leader>g P
- Go to definition:
ctrl+] - Return from definition:
ctrl+t - Find in workspace:
<leader>s w
- Sort lines: Select lines +
<leader>s s - Transform case: Select text +
<leader>u/l - Multi-line editing: Select lines +
<leader>a
Key settings include:
- Bracket pair colorization
- Enhanced minimap configuration
- Improved fold handling
- Yank highlighting
- Custom search highlighting
- Mode-specific status line colors
Edit the following files to customize the configuration:
settings.json: VS Code and Vim settingskeybindings.json: Custom keyboard shortcuts
You can customize mode colors in settings.json:
"vim.statusBarColors.normal": "#519aba",
"vim.statusBarColors.insert": "#98c379",
"vim.statusBarColors.visual": "#c678dd"Feel free to submit issues and enhancement requests!