Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 27, 2021 04:14 pm GMT

How To Neovim Inside VS Code

If you've been wanting to try out and learn vim, but don't want to leave the comforts of VS Code behind, this tutorial is for you. In this tutorial, I will show you how to achieve (what I consider to be) the best of both worlds when it comes to using these tools together.

Installation

First, we'll start off by adding the Neovim extension for VS Code. Once that extension is installed, we're going to need to point the extension at an instance of neovim. It's very important that we use v0.5.0 instead of anything v0.4 or lower. If you do, you'll experience a hard time with this extension.

Once you download and install the Neovim v0.5.0, you're going to want to point your Neovim extension at this installation.

neovim extension settings

Configuration

I like to turn the ctrl keys for insert and normal mode off. This means you can still use ctrl + c all the other vs code keybindings will work as expected.

ctrl keys off

I also like to double-tap j while in insert mode to escape into normal mode. You can add the following snippet to your keybindings.json if you'd like:

{    "command": "vscode-neovim.compositeEscape1",    "key": "j",    "when": "neovim.mode == insert && editorTextFocus",    "args": "j"}

Conclusion

I hope you enjoy learning VIM from the comfort of your VS Code editor! Here's a great VIM cheat sheet I have bookmarked with a bunch of great and useful keyboard shortcuts for VIM.


Original Link: https://dev.to/jimmymcbride/how-to-neovim-inside-vs-code-5a1g

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To