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 t…


This content originally appeared on DEV Community and was authored by Jimmy McBride

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.


This content originally appeared on DEV Community and was authored by Jimmy McBride


Print Share Comment Cite Upload Translate Updates
APA

Jimmy McBride | Sciencx (2021-04-27T16:14:16+00:00) How To Neovim Inside VS Code. Retrieved from https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/

MLA
" » How To Neovim Inside VS Code." Jimmy McBride | Sciencx - Tuesday April 27, 2021, https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/
HARVARD
Jimmy McBride | Sciencx Tuesday April 27, 2021 » How To Neovim Inside VS Code., viewed ,<https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/>
VANCOUVER
Jimmy McBride | Sciencx - » How To Neovim Inside VS Code. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/
CHICAGO
" » How To Neovim Inside VS Code." Jimmy McBride | Sciencx - Accessed . https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/
IEEE
" » How To Neovim Inside VS Code." Jimmy McBride | Sciencx [Online]. Available: https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/. [Accessed: ]
rf:citation
» How To Neovim Inside VS Code | Jimmy McBride | Sciencx | https://www.scien.cx/2021/04/27/how-to-neovim-inside-vs-code/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.