Larson, DavidX S schrieb:
>> It cannot work reliable with redir.
>> Think of options with possible trailing whitespace, like
>> 'listchars', 'showbreak', 'breakat', etc.
>> There is no backslash for escaping in the output.
>
> I see your point. I've changed the script to only parse the option names
> (much easier to do). The option value is now set via "&option".
>
> See the attached script.
>
> Cheers,
> David
Here is another way to get the option names, it's basically
:set <C-A>
func! GetOptionNames()
exec "sil normal! :set \<C-A>'\<C-B>\<C-Right>\<C-U>\<Del>let str='\r"
return split(str)
endfunc
let optionlist = GetOptionNames()
" The output is almost sorted and includes "all" and "termcap" as the
" first two entries.
--
Andy
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---