Sunday, July 31, 2011

Re: Detecting Encrypted File

Reply to message «Re: Detecting Encrypted File»,
sent 21:35:41 31 July 2011, Sunday
by Paul:

Try BufWinEnter, BufEnter or such. I don't really know which events are launched
after file is decrypted.

Original message:
> On Sun, Jul 31, 2011 at 07:52:36PM +0400, ZyX wrote:
> > if !empty(&key) | set viminfo= | endif
>
> This works when I've already opened the file, but it doesn't work when I
> put it in my .vimrc, even when I try it both ways, like this:
>
> if !empty(&key) | set viminfo= | endif
> au! BufRead * if !empty(&key) | set viminfo= | endif
>
> viminfo still has things in it after the file is loaded.
>
> >Do not use :setlocal here: viminfo is global option and using :setlocal
> >will only confuse you as in this case it is not different to :set or
> >:setglobal.
>
> OK, thanks.

No comments: