Friday, December 21, 2012

Re: Re: Reload Buffer

On 06:01 Fri 21 Dec , stillLearningVim wrote:
> Thanks for the suggestions!
>
> Source looks excellent and Dominique, that is a very cool trick. With :source though, it seems to only execute the commands in the vimrc, so if I remove something it doesn't un-execute if that makes any sense. Is there another way of doing this? Or maybe I'm missing something
>
> Thanks
>
> --
> 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

There is no easy way of making it work as you wish, i.e. unset changes.
The possible thing is to make a list of all options and prior to execute
vimrc file set all the options to its default value with a loop

for se in settings
exe 'set '.se.'&'
endfor

Though this will not work when you set local values (with setl). You
can then wrap this loop and a vimrc source command in a function which
is called via BufWritePost autocommand.

Best,
Marcin

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

No comments: