> On Tue, Aug 25, 2009 at 1:19 PM, Tinou <tinoucas@gmail.com> wrote:
>
>>> :redir => current_highlighting :hi :redir END
>>>
>>> and then manipulating current_highlighting and saving it to a file.
>> Ah, perfect, just what I needed.
>> Thanks.
>>
>
> But don't forget the 'manipulating'; the output of :hi is not quite ready
> for executing (for one thing, it has all those xxx's in it).
>
The output isn't quite useful, because most :hi group has a default
value. Sadly you must write a script to do that, you need to reset
everything to NONE before apply the new value.
an example:
if the default value is :hi AAA guifg=bbb guibg=ccc
and the current value is :hi AAA guifg=bbb guibg=NONE
redir and you will get :hi AAA guifg=bbb
as the output,
however, execute the output in a new session
will give you :hi AAA guifg=bbb guibg=ccc
since the default value of guibg is there.
another example:
if the default value is :hi AAA gui=reverse
and the current value is :hi AAA gui=bold
redir and you will get :hi AAA gui=bold
as the output,
however, execute the output in a new session
will give you :hi AAA gui=bold,reverse
since the default value is there.
Rationale:
:hi clear
does not clear all colors, it reset all colors to default, the redir
output cannot be used as an addition to "default color", it can only be
applied to "really empty color".
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment