Friday, August 27, 2010

Re: vim and encryption

Hi!

On Thu, 26 Aug 2010, ZyX wrote:
> Текст сообщения:
> > Ответ на сообщение <<Re: vim and encryption>>,
> > присланное в 22:08:06 25 августа 2010, Среда,
> > отправитель Tobias Klausmann:
> >
> > 1. All options either exist in current vim session or not. This cannot be
> > changed.
> > 2. ``echo exists("&key")'' echoes 1 as expected. ``exists("key")'' is a
> > check for either global or local to function varible ``key'', not for an
> > option. 3. You can check for availability of encryption with
> > ``has("cryptv")''. But this will not let you check whether file is
> > encrypted.
> > 4. What you want is probably ``if !empty(&key)''. My vim echoes five stars
> > when I set key and nothing when key is empty. Though five stars are not
> > your password, but they are definitely not an empty string, so empty(&key)
> > will return 0 if key is not set.
> >
> Sorry, !empty(&key) will return 0 if key is not set.

Thanks! That works the way I wanted it to.

Regards,
Tobias

--
Sent from aboard the Culture ship
LOU (Killer Class) Attitude Adjuster

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