A Note on Vim Versions

To follow the tips in this book, you’re going to need an up-to-date installation of Vim. (The clue is right there in the book’s title!) You have two options: use version 8 of Vim or version 0.2 of Neovim.

Vim Version 8

Version 8 of Vim was released in September 2016. It introduced some new features that you’ll learn about in this book, such as packages and job control. As a minimum requirement, you’ll need to be running version 8 of Vim, compiled with the huge feature set. You’ll find instructions on how to install Vim 8 in Tip 1, Installing Vim 8.

All of the tips in this book have been tested with version 8.0 of Vim, apart from a handful of tips which have been written especially for Neovim.

Neovim

Neovim is a community-run fork of Vim that can be used as a drop-in replacement for Vim. It supports all of the same features Vim 8 offers and more. You’ll find instructions on how to install Neovim in Tip 2, Switching to Neovim.

All of the tips in this book have been tested with Version 0.2.2 of Neovim.

Terminology

In many ways, Vim 8 and Neovim are interchangeable. When I use the word “Vim” by itself, you can read that as “Vim 8,” or you can read it as “Neovim.” If I want to make a specific point about one particular version of Vim, then I will specify “Vim 8” or “Neovim” to make that clear.

If you see this signpost at the start of a tip, it means that the tip is relevant only for Neovim:

images/neovim-only.png

If a tip only applies to Vim 8, you’ll see a signpost like this:

images/vim-8-only.png

If you see no such signposts at the start of a tip, then that tip should work just as well in both versions. Most of the tips in this book work in both Vim 8 and Neovim.

Contextual Instructions Using $VIMCONFIG

Vim 8 and Neovim follow different conventions on where to keep their configuration files. Vim 8 typically places them in a ~/.vim directory, whereas Neovim uses the ~/.config/nvim directory. These are important details, but it would get distracting if I mentioned them every time I referenced a runtime file.

To avoid this problem, we’ll refer to certain files and directories using environment variables $MYVIMRC, $VIMCONFIG, and $VIMDATA. When you see $VIMCONFIG, you can interpret that as ~/.vim if you are using Vim, or ~/.config/nvim if you are using Neovim. You’ll find complete instructions on how to interpret these variables in Contextual Instructions for Vim and Contextual Instructions for Neovim.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.203.68