This project aims to guide you through setting up and learning Vim within Visual Studio Code using the VSCodeVim and VSCode-Neovim extensions.
VSCodeVim is a Vim emulator for Visual Studio Code.
- Install the extension from the VSCode Marketplace
- After installation, you can modify settings in your settings.json file to customize the Vim experience. An example configuration can be found here.
VSCode-Neovim is an extension that integrates Neovim into Visual Studio Code for advanced Vim features.
- Install Neovim on your system. The installation guide can be found here.
- Install the VSCode-Neovim extension from the VSCode Marketplace
- After installation, specify the path to your Neovim executable in your settings.json file.
- You can also customize keybindings in your keybindings.json file, and use a lua file for additional customization. Example configurations can be found here.
To begin using Vim commands in Visual Studio Code, just open a file and start editing. Remember that the modes (insert, normal, visual) are a key part of Vim, and if you're not familiar with them, you should look into a Vim tutorial.
The repository includes several configuration files that are needed to set up and customize VSCodeVim and VSCode-Neovim:
- vim-settings.json: Contains settings for the VSCodeVim extension. Copy its content to your VS Code
settings.json
file. - keybindings.json: Contains custom keybindings for the VSCode-Neovim extension. Copy its content to your VS Code
keybindings.json
file. - nvim-settings.json: Contains settings for the VSCode-Neovim extension. Copy its content to your VS Code
settings.json
file. - vs-code.lua: Lua configuration file for Neovim when used with the VSCode-Neovim extension. You need to put this in your Neovim configuration directory.
Please make sure to adjust the file paths according to your system configuration and needs.
Here are some pros and cons of using VSCodeVim versus VSCode-Neovim:
Pros:
- More lightweight.
- Doesn't require installing and integrating an external tool (Neovim).
- Simpler setup and configuration.
- Generally enough for basic Vim keybinding emulation.
Cons:
- Might not support all advanced Vim features.
Pros:
- Full Vim emulation with support for advanced Vim features.
- Can use Neovim configurations and plugins.
Cons:
- Requires installing Neovim on your system and setting up the integration in VS Code.
- More complex configuration.
Remember to choose the extension that best suits your needs and level of comfort with Vim and/or Neovim.
LazyVim is a powerful and lightweight Neovim configuration. With VSCode-Neovim, you can also utilize LazyVim inside VSCode for an optimized Vim experience.
- Install LazyVim following the instruction on LazyVim's website
- Update your
vs-code.lua
based on the configuration provided here - Additional tips and configuration examples can be found here
Here are some video tutorials that can help you get started:
- Website: https://productsway.com/
- Twitter: @jellydn
- Github: @jellydn
Give a ⭐️ if this project helped you!