Doing all my editing in Vim I thought for some time whether to switch to NeoVim ↗. A few days ago I finally decided to do the switch. The result is awesome.

I ought to credit ThePrimeagen whose videotutorial ↗ stands was the main reason for my transition. Another reason was a nice tutorial for using VimTeX by ejmastnak ↗.

Why

Here are my reasons to use NeoVim.

Installation

My current setup is available at https://github.com/vaclavblazej/nvim ↗. Installation on Ubuntu goes like this.

  • Install neovim
  • Configure init.lua in ~/.config/nvim/.
  • (optionally) set alias vim=nvim in ~/.zshrc (~/.bashrc for bash users).

For more details, see the tutorials mentioned above.

Some basics

I just note some things that would make my transition little smoother.

  • Obviously, you need to install neovim. Some errors or comments may mention that a program is missing, then install it as well.
  • NeoVim configuration lives in ~/.config/nvim/. (Vim config is traditionally in ~/.vim/.)
  • NeoVim config entry file is ~/.config/nvim/init.lua (or init.vim for just copied old config). (Vim config is traditionally in ~/.vimrc.)
  • All files (e.g. file.lua) within .config/nvim/lua can be requested by other script files by require("file") command.
  • Files in .config/nvim/after folder are loaded automatically.
  • It is important to load lazy after setup of key remaps as otherwise leader key may be old for plugin commands.
  • The lazy plugin manager downloads the plugins on startup. Otherwise just pull it up with :Lazy.