Re: auto reload of config files
- On Wednesday, May 30, 2012 2:55:03 AM UTC-6, Benjamin R. Haskell wrote:
> A better way to prevent doubling autocmds is to put them in a groupGood points. It's been switched. Thank you.
> In what way do they not work? To verify that your .vimrc is beingIt seems .vimrc *is* being reloaded. But the settings I'm testing don't appear to be changing.
> reloaded, add this to your .vimrc:
> echomsg 'Loaded .vimrc'
> Also note that your plugins won't be reloaded just because you sourceAnd this is probably part of the reason why they aren't changing ... these aren't plugins, even though I have them in my after/plugins subdirectory, they're just settings and random functions and mappings I use.
> your ~/.vimrc. They're autoloaded at startup. (See :help load-plugins
> for the gory details.) From that help text, maybe you also want:
I moved these files to after/plugin so I wouldn't have to remember to source them in my .vimrc but it appears now that may not be the best choice.
> autocmd BufWritePost misc.vim runtime! plugins/**/*.vimAfter reading the docs on the runtime command I came up with the following for my .vimrc. It seems to work as expected.
au BufWritePost .vimrc source $MYVIMRC
au BufWritePost */extra/*.vim source $MYVIMRC
Thanks for the pointers.
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php