To reload the .vimrc
file without restarting Vim on Linux or Unix, you can use the :source
command in Vim.
To reload the .vimrc
file, open Vim and enter the following command:
:source ~/.vimrc
This will reload the .vimrc
file and apply any changes to the current Vim session.
You can also create a custom command in your .vimrc
file to reload the .vimrc
file. For example, you can add the following line to your .vimrc
file:
command! ReloadVimrc source ~/.vimrc
This will create a custom command ReloadVimrc
that you can use to reload the .vimrc
file. To use the command, enter the following in Vim:
:ReloadVimrc