I want to edit .vimrc
file from Vim and apply them without restarting Vim.
Open vim and type ":version" and hit Enter. You will get paths to your vimrc files. Make sure that your vimrc file is not overwritten by another one (with a higher priority). Please refer to Open vimrc file.
A default Vim installation will feature a file containing Vim's core global settings called vimrc. This file will be located at either /etc/vim/vimrc or etc/vimrc , depending on your Linux distribution.
Yes, just use the :so %
command while editing your .vimrc.
If you want vim to auto-reload your configuration, you must add the following commands :
augroup myvimrchooks au! autocmd bufwritepost .vimrc source $MYVIMRC augroup END
the grouping of autocommand is here to avoid "exponential" reloading if you save several times your configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With