Am 2015-05-05 11:21, schrieb lith:
Hi!

Some vim options are boolean, i.e. integers with the possible values 0
and 1. You can, e.g., set `ai` and `noai` or use `let &ai = 1`. Other
options are numeric/integer or string values.

type(&option) can only be used to distinguish string from bool/int
options. exist('&noai') returns 0, so it cannot be used to distinguish
bool from int options. Is there another way to determine whether an
option is a bool (an int that takes only the values 0 or 1) or an int?

Some hacks, I can think of:
- parsing $VIMRUNTIME/doc/options.txt
- try/catch block around :set inv<option>

BTW: What is the problem with treating boolean options like integer?

Best,
Christian

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

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to