Neovim, configurable fork of Vim for a better user experience

About Neovim

In the next article we are going to take a look at Neovim. Is about a fork of the Vim code. The program gives us the good of Vim with a better user experience thanks to the configuration possibilities. In case someone does not know yet, it must be said that Vim is a text editor based on modes. It was born as an improvement of Vi (1976). Its interface is not graphical, but text-based. Although there are several implementations with a graphical interface, such as gVim. The editor at hand is a direct replacement for Vim. If you are a Vim user, you will find yourself comfortable with Neovim.

In this editor everything can be controlled with the keyboard via commands. At first it may seem a bit difficult to remember them all, and at first it is. But it is also true that they are organized in a logical way, and eventually they come out on their own. The program will make it easier for us to edit text, allowing us to automate repetitive tasks. Boring tasks can be done with just a couple of keys.

General characteristics of Neovim

Neovim php code

  • All the default settings make you can use it immediately.
  • Un terminal emulator.
  • The editor provides us with an API that allows the communication with Neovim from any language programming, safely and asynchronously.
  • Modern terminal functions such as cursor style, focus events, pasting in brackets, etc.
  • As I have already written, it is very configurable. It can be said that it is as if you were building your own editor. When you finish setting it up, you will have a custom editor that meets your specific needs.
  • His behavior is expandable through plugins. If you are a Vim user, you can keep using the same plugins, plus those that the community has developed for Neovim. And if you can't find a plugin for you and you dare, you can create yours using your favorite language.
  • In addition, it will offer us the same features as any other code editor, such as: auto complete, spell check, tabs, syntax coloring, search and replace with regular expressions, etc.

El project source code we can find it available in the GitHub page from the editor.

Neovim installation on Ubuntu

neovim installation from Ubuntu software option

We can install this editor in many ways. The simplest is to perform the installation from software option from Ubuntu. To have the latest version you have to add the Neovim PPA. Run the following command in the terminal (Ctrl + Alt + T):

sudo apt-add-repository ppa:neovim-ppa/stable

Then you have to update the packages and install Neovim by typing in the same terminal:

sudo apt-get update

sudo apt-get install neovim

Both options will install the same version of the program. In case we do not want to install anything on the system, you can use the Neovim .Appimage file. To get it, you need to have curl installed. After making sure you have this tool, in the terminal (Ctrl + Alt + T) type:

download naovim appimage

curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage

chmod u+x nvim.appimage

Once downloaded and with the necessary permissions, we can launch the editor by typing in the same terminal:

./nvim.appimage

After any of the above options, we can now make use of this vim-based editor. Who needs it can find all the documentation on possible installations on the project's GitHub page.

It must be said that this program has many configuration possibilities, so go through the official documentation or by the section of the user manual It will make our editor look much better and friendlier than what we will find by default.

Setting up Neovim

Neovim Tutorial

Neovim includes a interactive tutorial, run the command :Tutor to start it.

If you close Neovim, all the settings you had in the session will be lost. To maintain them, the init.vim file, which is loaded every time Neovim is started. If you use Vim, this file serves the same function as vim's .vimrc file.

This configuration file it is located in ~ / .config / nvim / init.vim. If it doesn't exist, create it. The configuration file can get very large, so try to document everything you put on it. Comments can be added with «. We will be able to obtain more information about this configuration file in the Wiki of the program.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.