(Last Updated On: December 21, 2018)

You just installed RHEL 8 and would like to use VIM Text Editor?. Choosing the right text/code editor for your daily tasks is crucial to ensure you deliver in time and keep up with the workload. In this blog post, we will look at how to Install and Configure VIM on RHEL 8 / CentOS 8. See RHEL 8 New Features

VIM comes with an impressive set of features which can be extended using the plenty of plugins available for various Programming Languages. It is sad that the default RHEL 8 text editor is vi.

If you type vim in your terminal, you’ll get:

$ vim
-bash: /usr/bin/vim: No such file or directory

Install VIM Text Editor on RHEL 8 / CentOS 8  by running the command:

sudo yum -y install vim

The binary package will be installed to:

# which vim
/usr/bin/vim

If you now execute the vim command, you should get below output.

Configure vim with basic settings by creating a new file on ~/.vimrc with the contents below.

set nocompatible
set backup
set history=1000
set ignorecase
set smartcase
set hlsearch
set incsearch
set number
set showmatch
syntax on
highlight Comment ctermfg=LightCyan
set wrap

Save the file and then exit. You now have VIM Text Editor installed on your RHEL 8 / CentOS 8 server or Workstation.

If you’re new to VIM, read the Vim Cheat Sheet guide. For complex VIM configurations or VIM IDE, check:

https://github.com/mhinz/vim-galore

https://github.com/SpaceVim/SpaceVim