Skip to content

This project aims to guide you through setting up and learning Vim within Visual Studio Code using the VSCodeVim and VSCode-Neovim extensions.

Notifications You must be signed in to change notification settings

jellydn/learn-vim-with-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to learn-vim-with-vscode 👋

This project aims to guide you through setting up and learning Vim within Visual Studio Code using the VSCodeVim and VSCode-Neovim extensions.

IT Man - Tip #38 - Learn Vim with VSCode [Vietnamese]

Setup

VSCodeVim

VSCodeVim is a Vim emulator for Visual Studio Code.

  1. Install the extension from the VSCode Marketplace
  2. 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

VSCode-Neovim is an extension that integrates Neovim into Visual Studio Code for advanced Vim features.

  1. Install Neovim on your system. The installation guide can be found here.
  2. Install the VSCode-Neovim extension from the VSCode Marketplace
  3. After installation, specify the path to your Neovim executable in your settings.json file.
  4. You can also customize keybindings in your keybindings.json file, and use a lua file for additional customization. Example configurations can be found here.

Usage

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.

File Reference

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.

Comparison: VSCodeVim vs. VSCode-Neovim

Here are some pros and cons of using VSCodeVim versus VSCode-Neovim:

VSCodeVim

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.

VSCode-Neovim

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.

Receipt

LazyVim in VSCode

LazyVim is a powerful and lightweight Neovim configuration. With VSCode-Neovim, you can also utilize LazyVim inside VSCode for an optimized Vim experience.

  1. Install LazyVim following the instruction on LazyVim's website
  2. Update your vs-code.lua based on the configuration provided here
  3. Additional tips and configuration examples can be found here

Video Tutorials

Here are some video tutorials that can help you get started:

IT Man - Talk #35 #Neovim IDE for Web Developer [Vietnamese]

IT Man - Talk #33 NeoVim as IDE [Vietnamese]

Author

Show your support

Give a ⭐️ if this project helped you!

About

This project aims to guide you through setting up and learning Vim within Visual Studio Code using the VSCodeVim and VSCode-Neovim extensions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages