1 " Vim syntax support file
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
3 " Last Change: 2001 May 26
5 " This file sets up for syntax highlighting.
6 " It is loaded from "syntax.vim" and "manual.vim".
7 " 1. Set the default highlight groups.
8 " 2. Install Syntax autocommands for all the available syntax files.
12 " let others know that syntax has been switched on
15 " The default methods for highlighting. Can be overridden later.
16 " Many terminals can only use six different colors (plus black and white).
17 " Therefore the number of colors used is kept low. It doesn't look nice with
18 " too many colors anyway.
19 " Careful with "cterm=bold", it may change the color to bright.
21 " There are two sets of defaults: for a dark and a light background.
22 if &background == "dark"
23 hi Comment term=bold ctermfg=Cyan guifg=#80a0ff
24 hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0
25 hi Special term=bold ctermfg=LightRed guifg=Orange
26 hi Identifier term=underline cterm=bold ctermfg=Cyan guifg=#40ffff
27 hi Statement term=bold ctermfg=Yellow guifg=#ffff60 gui=bold
28 hi PreProc term=underline ctermfg=LightBlue guifg=#ff80ff
29 hi Type term=underline ctermfg=LightGreen guifg=#60ff60 gui=bold
30 hi Ignore ctermfg=black guifg=bg
32 hi Comment term=bold ctermfg=DarkBlue guifg=Blue
33 hi Constant term=underline ctermfg=DarkRed guifg=Magenta
34 hi Special term=bold ctermfg=DarkMagenta guifg=SlateBlue
35 hi Identifier term=underline ctermfg=DarkCyan guifg=DarkCyan
36 hi Statement term=bold ctermfg=Brown gui=bold guifg=Brown
37 hi PreProc term=underline ctermfg=DarkMagenta guifg=Purple
38 hi Type term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold
39 hi Ignore ctermfg=white guifg=bg
41 hi Error term=reverse ctermbg=Red ctermfg=White guibg=Red guifg=White
42 hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow
44 " Common groups that link to default highlighting.
45 " You can specify other highlighting easily.
46 hi link String Constant
47 hi link Character Constant
48 hi link Number Constant
49 hi link Boolean Constant
51 hi link Function Identifier
52 hi link Conditional Statement
53 hi link Repeat Statement
54 hi link Label Statement
55 hi link Operator Statement
56 hi link Keyword Statement
57 hi link Exception Statement
58 hi link Include PreProc
59 hi link Define PreProc
61 hi link PreCondit PreProc
62 hi link StorageClass Type
63 hi link Structure Type
66 hi link SpecialChar Special
67 hi link Delimiter Special
68 hi link SpecialComment Special
72 " First remove all old syntax autocommands.
77 au Syntax OFF syn clear
80 au Syntax ON if &filetype != "" | exe "set syntax=" . &filetype | else | echohl ErrorMsg | echo "filetype unknown" | echohl None | endif
83 " The Syntax autocommands are all listed here, so that the user can remove,
84 " change or add his own for each syntax separately.
86 " Use the :SynAu user command to shorten the list below.
87 " If you get an error message "Command already exists", you already have
88 " defined the ":SynAu" command somewhere. You should rename it.
89 command -nargs=1 SynAu au Syntax <args> so $VIMRUNTIME/syntax/<args>.vim
379 " Source the user-specified syntax highlighting file
380 if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
381 execute "source " . mysyntaxfile
384 endif " has("syntax")