Linux Reload .vimrc File without Restarting Vim Editor

This post will guide you how to reload your .vimrc file without restarting vim editor in Linux. and how do I apply vim configurations without restarting vim on CentOS/RHEL Linux machine. How to reload syntax file without restarting vim.

If you cannot find your .vimrc file in your home directory, you need to create it. and in the most installations this file is not created by default.

Reload .vimrc File without Restarting Vim Editor


Let’s see the below detailed steps:
#1 open one file called fio.txt using vim editor

#vim fio.txt

#2 Load vim configuration file called ~/.vimrc, type Esc key, and then type :vs ~/.vimrc, press Enter key.

#3 added some configuration in .vimrc file, such as:

set number

#4 type :wq to save and close the current .vimrc file.

#5 type the following command to reload the latest .vimrc configuration file:

:so $MYVIMRC

Or

:source ~/.vimrc

 

You might also like:

Sidebar



back to top