3

I am using Vim with Vundle and I just changed a plugin specific setting in my .vimrc:

let g:NERDTreeWinSize = 60

How do I reload the plugin to pick up this setting(s) without restarting vim?

2 Answers2

7

Most plugins directly use the configuration variables, so it suffices to apply the variable setting to the current Vim session, and then re-trigger the plugin.


For the first, you can either re-source your entire ~/.vimrc (if it's clean, and you avoid re-defining autocmds twice):

:source ~/.vimrc

(You can abbreviate that as :so % if you're currently editing it.) Or you just selectively execute the changed line, e.g. via:

yy:@"

For NERD_tree and this particular config, retriggering can be done via:

  1. closing and reopening NERD_tree
  2. zooming the NERD_tree window in and out
Ingo Karkat
  • 23,523
0

I figured out that a restarting the plugin (in this case :NERDTree) with the basic start command was enough hence this was my solution:

Edit .vimrc

let g:NERDTreeWinSize = 60

Save .vimrc

:w

Reload .vimrc as source

:source %

Run :NERDTree

:NERDTree