> Zdenek Sekera wrote:
> > OK, I have now
> > lewt current_vimrc = expand("<sfile>")
> > > E.g: I have things like
> > >
> > > autocmd BufWritePost .vimrc source <afile>
> > How do I turn the contents of a variable (current_vimrc) into a file
> > name usable as an event in the autocmd?
> Something like:
> autocmd BufWritePost *
> \ if <afile> == current_vimrc |
> \ source <afile> |
> \ endif
Aha, clever. Thanks!
Your message has been successfully submitted and would be delivered to recipients shortly.
Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer.
We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.