sponsor Vim development Vim logo Vim Book Ad

SyntaxAttr.vim : Show syntax highlighting attributes of character under cursor.

 script karma  Rating 64/24, Downloaded by 1526    Comments, bugs, improvements  Vim wiki

created by
Gary Holloway
 
script type
utility
 
description
Displays the syntax highlighting attributes of the character under the cursor; including syntax group (and what it's linked to, if linked), foreground/background colors (name and numeric equivallent), bold, underline, etc.

Example output:

[WIth cursor on a function name in a vim script]
     group: vimUserFuncName guifg=DarkCyan(#008b8b) gui=bold

[With cursor on "function" keyword in vim script]
     group: vimFuncKey->Statement guifg=Brown(#a52a2a) gui=bold

[WIth cursor on "let" keyword in vim script]
     group: vimLet->Statement guifg=Brown(#a52a2a) gui=bold

This can be helpfull both developing syntax files, and for determining what something is (according to the syntax rules), since the group names used in syntax files are usually well-named.

Recommended use with a mapping such as:

  map -a :call SyntaxAttr()<CR>
 
install details
I put it in my autoload directory (~/vim/autoload), so the function is automagically loaded as needed via an autocommand:

autocmd FuncUndefined * exe 'runtime autoload/' . expand('<afile>') . '.vim'
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
SyntaxAttr.vim 1.1 2002-08-15 6.0 Gary Holloway Initial upload
ip used for rating: 23.22.59.252

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo