DEV Community

Cover image for Move to the dark side of Vim
Mark Cabanes
Mark Cabanes

Posted on

Move to the dark side of Vim

My Experience

When I started programming my code editor was Vscode, although I already knew of the existence of Vim I did not know its advantages. One night I decided to remove Vscode from my computer and install vim, more specifically Neovim. In this post I am going to show you the advantages of this code editor and how to install it on your computer.

Advantages

At first Vim becomes complex to learn as you have many commands and keyboard shortcuts. But once you learn all these little things that make it difficult for this code editor and you become one with Vim you won't be able to come back from the dark side.

Install Neovim in Linux

If you have another operating system you can see how to install Neovim on its official website

Ubuntu/Debian

sudo apt-get update && sudo apt-get install neovim
Enter fullscreen mode Exit fullscreen mode

Arch-linux

sudo pacman -Sy neovim
Enter fullscreen mode Exit fullscreen mode

Fedora

sudo dnf install neovim
Enter fullscreen mode Exit fullscreen mode

To open neovim in terminal use the command nvim

Configuration

To configure neovim you have to create the folder nvim in the path ~/.config/
Inside the nvim folder you have to create the init.vim file and in that file will go all your settings

Installation

Step 1

Vim-Plug is a module manager, which is used to install plugins.
To install it you have to run the following command in the terminal.

curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Enter fullscreen mode Exit fullscreen mode

Step 2

To install the plugins you must create the plugins folder in the directory ~/.config/nvim
To add plugins to neovim you must write to the init.vim

call plug#begin('~/.config/nvim/plugins')

" here will go the plugins 

call plug#end()
Enter fullscreen mode Exit fullscreen mode

screenshot

Step 3

Once the plugins are added restart neovim and in command mode you have to type

:PlugInstall
Enter fullscreen mode Exit fullscreen mode

Top comments (0)