On Thursday, February 18, 2016 at 7:02:09 AM UTC-6, Tony Mechelynck wrote:
> On Thu, Feb 18, 2016 at 11:13 AM, <mibelcarlos@gmail.com> wrote:
> > Dear all,
> >
> > I went through the config files for syntax highlighting in vim and I found keywords grouped under the identifiers:
> >
> > Keyword
> > Identifier
> > Conditional
> > Repeat
> > Todo
> >
> > etc etc
> >
> > How could I access the associated colours?
> >
> > Thank you very much
> >
> > Carlos
> >
>
>
> See
> :help :hi
> :help :highlight-verbose
>
> Examples:
> :verbose hi TODO
> Todo xxx term=standout ctermfg=0 ctermbg=14 guifg=Blue guibg=Yellow
> Last set from /usr/local/share/vim/vim74/syntax/syncolor.vim
> :verbose hi Keyword
> Keyword xxx links to Statement
> Last set from /usr/local/share/vim/vim74/syntax/syncolor.vim
> :verbose hi Conditional
> Conditional xxx links to Statement
> Last set from /usr/local/share/vim/vim74/syntax/syncolor.vim
> :verbose hi Statement
> Statement xxx term=bold ctermfg=6 gui=bold guifg=Brown
> Last set from /usr/local/share/vim/vim74/syntax/syncolor.vim
>
>
Interactively, sure.
But in a script, it's probably better to use the hlID() and synIDattr() functions. :help hlID() has an example of getting the background color for comments that can easily be adapted for other groups or attributes.
--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thursday, February 18, 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment