However already opened mvim windows do not load changed done to vimrc until I close all mvim windows and start fresh.
Is there a way I can tell existing mvim windows to load new vimrc file without closing and opening all windows every time.
:source ~/.vimrc
But that won’t unset options that you got rid of, so if you want to test some behavior, opening a new Vim is the only way to be sure.
A suggestion,
You can also map <F2> for reloading the vimrc file like this,
map <F2> :source $MYVIMRC<CR>:echoe "Vimrc Reloaded!!!"<CR>I cannot add comments, so posting as an answer....
Check the MacVim Advanced Preferences dialog (MacVim -> Preferences... -> "Advanced" tab) to see if you have "Enable Quickstart" checked. Here's the explanation from the dialog box:
New windows open instantaneously with Quickstart enabled but they may not have the latest runtime files sourced. If you modify your runtime files (e.g. files inside the ~/.vim directory) then you may need to disable and re-enable Quickstart to ensure that the next window you open will pick up on those changes.
I leave Quickstart disabled, so new MacVim windows load the .vimrc, .gvimrc, etc., fresh each time.
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