This time I will show you how to use Linux to repeatedly load .vimrc files, and what are the precautions for using Linux to repeatedly load .vimrc files. The following is a practical case, let's take a look.
I am a new Vim editor user. I usually use :vs ~/.vimrc
to load the~/.vimrc
configuration. And when I edit .vimrc, I need to reload it without restarting the Vim session. In Linux or Unix-like systems, how to reload .vimrc after editing it without restarting Vim?
Vim is a free, open source and upwardly compatible editor with Vi. It can be used to edit all kinds of text. It is particularly useful when editing programs written in C/Perl/Python. You can use it to edit Linux/Unix configuration files. ~/.vimrc is your personal Vim initialization and customization file.
How to reload .vimrc without restarting the Vim session
The process of reloading .vimrc in Vim without restarting :
Enter vim filename to start vim
Press Esc and then enter: vs ~/.vimrc to load vim configuration
Add custom configuration like this:
filetype indent plugin on set number syntax on
4. Use `:wq` to save the file, And exit from the `~/.vimrc` window
5. Enter any of the following commands to reload `~/.vimrc`: `:so $MYVIMRC` or `:source ~/.vimrc`.
[![How to reload .vimrc file without restarting vim][1]][1]
*Figure 1: Edit ~/.vimrc and reload it when needed without Exit vim so that you can continue editing the program *
`:so[urce]! {file}` This vim command will read the configuration from the given file such as `~/.vimrc`. These commands are executed in normal mode just as you type them. When you are following `:global`, :`argdo`, `:windo`, `:bufdo`, in a loop, or following another command, the display no longer updates on command execution.
How to set the keys to edit and reload ~/.vimrc Follow your `~/.vimrc` with these: " Edit vimr configuration file nnoremap confe :e $MYVIMRC " Reload vims configuration file nnoremap confr :source $MYVIMRC Now just press `Esc` and enter `confe` to edit `~/.vimrc`. Press `Esc` followed by `confr` to reload. Some people like to use the `Use iview’s UI framework to customize the player
How to operate vue code specification detection
The above is the detailed content of How to repeatedly load .vimrc files using Linux. For more information, please follow other related articles on the PHP Chinese website!