Sunday, July 31, 2011

Re: Detecting Encrypted File

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.

--

.

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