0%

vim-highlight-syntax

显示颜色

(x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done)

colorizer

xterm-color-table.vim 使用命令 :XtermColorTable

显示语法

vim-syntaxattr 使用命令 :call SyntaxAttr()

HighLight Syntax

Syntax

help

:syntax

:syntax
--- 语法项目 ---
cLabel         xxx default case
cStructure     xxx union struct typedef enum
cStorageClass  xxx inline const volatile alignas register thread_local _Noreturn static extern _Alignas _Atomic restrict noreturn
                   _Thread_local auto
cInclude       xxx match /^\s*\zs\(%:\|#\)\s*include\>\s*["<]/  display contains=cIncluded
cDefine        xxx start=/^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>/ skip=/\\$/ end=/$/  keepend contains=ALLBUT,@cPreProcGroup,@Spell
cStatement     xxx return goto asm continue break
                   links to Statement

:help highlight-groups

:help group-name

:help group-name

(if syntax highlighting works properly you can see the actual color, except for "Ignore"):

        *Comment        any comment

        *Constant       any constant
         String         a string constant: "this is a string"
         Character      a character constant: 'c', '\n'
         Number         a number constant: 234, 0xff
         Boolean        a boolean constant: TRUE, false
         Float          a floating point constant: 2.3e10

        *Identifier     any variable name
         Function       function name (also: methods for classes)
        *Statement      any statement
         Conditional    if, then, else, endif, switch, etc.
         Repeat         for, do, while, etc.
         Label          case, default, etc.
         Operator       "sizeof", "+", "*", etc.
         Keyword        any other keyword
         Exception      try, catch, throw

        *PreProc        generic Preprocessor
         Include        preprocessor #include
         Define         preprocessor #define
         Macro          same as Define
         PreCondit      preprocessor #if, #else, #endif, etc.

        *Type           int, long, char, etc.
         StorageClass   static, register, volatile, etc.
         Structure      struct, union, enum, etc.
         Typedef        A typedef

        *Special        any special symbol
         SpecialChar    special character in a constant
         Tag            you can use CTRL-] on this
         Delimiter      character that needs attention
         SpecialComment special things inside a comment
         Debug          debugging statements

        *Underlined     text that stands out, HTML links

        *Ignore         left blank, hidden  hl-Ignore

        *Error          any erroneous construct
        *Todo           anything that needs extra attention; mostly the
                        keywords TODO FIXME and XXX