
gittech. site
for different kinds of informations and explorations.
VSCode-Vim-Mode: A Gentle Path to Vim Bliss in VS Code
Published at
3 days ago
Main Article
vscode-vim-mode
TL;DR
π Transforms VS Code into a GVim by running Vim within its integrated terminal
π Preserves editing states between sessions, sync file save actions between VSCode and Vim
π Only suitable for hardcore Vim users, you need to have a meticulously configured Vim environment already in place
π Untested on Windows, it should work with WSL
π Use full Vim features in VSCode with seamless switching
π Perfect for heavy Vim users who want to fully enjoy VSCode's ecosystem (e.g., Copilot)
π Probably the most straightforward VSCode & Vim integration plugin
π Leverage both ecosystems, avoid conflicts, and satisfy 'both/and'
π Can be used alongside other Vim emulation plugins without conflicts (e.g., VSCodeNeovim, VSCodeVim)
vscode-vim-mode
is a Visual Studio Code extension that provides Vim mode. With this extension, users can edit in VS Code using Vim or Neovim.
Features
- Toggle Vim mode in VS Code while preserving editing state
- Support for Vim and Neovim
- Sync save events to Nvim, triggering formatting etc.
FAQ
Q: Vim Mode icon displays abnormally (shows as a square or question mark)
A: Configure
editor.fontFamily
orterminal.integrated.fontFamily
, add a font that supports icons, such as:Hack Nerd Font
Installation
- Open VS Code
- Click the Extensions icon in the sidebar or press
Ctrl+Shift+X
to enter the Extensions view - Search for
vscode-vim-mode
- Click the
Install
button
Configuration (Optional)
After installation, you can configure the extension in settings:
- Click the gear icon or press
Ctrl+,
to open settings - Search for
vscode-vim-mode
- Configure the following options:
vscode-vim-mode.vimPath
: (Optional) Path to Vim or Neovim executablevscode-vim-mode.vimArgs
: (Optional) Arguments passed to Vim executablevscode-vim-mode.replaySave
: (Optional) When using Neovim, whether to sync save events to Neovim (triggering format etc). Defaults to false
Usage
Toggle Vim Mode
Commands
Use the command palette (Ctrl+Shift+P
) and enter one of the following commands:
Toggle Vim Mode
/Vim
: Toggle Vim mode
Button
Click the Vim
button in the top-right corner of the VSCode editor to toggle Vim mode
License
This project is licensed under the MIT License.