tags:

views:

244

answers:

3

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.

+5  A: 

: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.

jleedev
+1  A: 

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....

asdfg
that's a good one. Thanks
Nadal
+1  A: 

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.

Bill Odom