]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/syntax/conque_term.vim
Adapt paths for new homebrew prefix
[rbdr/dotfiles] / vim / syntax / conque_term.vim
1
2 " *******************************************************************************************************************
3 " MySQL *************************************************************************************************************
4 " *******************************************************************************************************************
5
6 syn match MySQLTableHead "^ *|.*| *$" nextgroup=MySQLTableDivide contains=MySQLTableBar oneline skipwhite skipnl
7 syn match MySQLTableBody "^ *|.*| *$" nextgroup=MySQLTableBody,MySQLTableEnd contains=MySQLTableBar,MySQLNull,MySQLBool,MySQLNumber,MySQLStorageClass oneline skipwhite skipnl
8 syn match MySQLTableEnd "^ *+[+=-]\++ *$" oneline
9 syn match MySQLTableDivide "^ *+[+=-]\++ *$" nextgroup=MySQLTableBody oneline skipwhite skipnl
10 syn match MySQLTableStart "^ *+[+=-]\++ *$" nextgroup=MySQLTableHead oneline skipwhite skipnl
11 syn match MySQLNull " NULL " contained contains=MySQLTableBar
12 syn match MySQLStorageClass " PRI " contained
13 syn match MySQLStorageClass " MUL " contained
14 syn match MySQLStorageClass " UNI " contained
15 syn match MySQLStorageClass " CURRENT_TIMESTAMP " contained
16 syn match MySQLStorageClass " auto_increment " contained
17 syn match MySQLTableBar "|" contained
18 syn match MySQLNumber "|\? *\d\+ *|" contained contains=MySQLTableBar
19 syn match MySQLQueryStat "^\d\+ rows\? in set.*" oneline
20 syn match MySQLPromptLine "^.\?mysql> .*$" contains=MySQLKeyword,MySQLPrompt,MySQLString oneline
21 syn match MySQLPromptLine "^ -> .*$" contains=MySQLKeyword,MySQLPrompt,MySQLString oneline
22 syn match MySQLPrompt "^.\?mysql>" contained oneline
23 syn match MySQLPrompt "^ ->" contained oneline
24 syn case ignore
25 syn keyword MySQLKeyword select count max sum avg date show table tables status like as from left right outer inner join contained
26 syn keyword MySQLKeyword where group by having limit offset order desc asc show contained
27 syn case match
28 syn region MySQLString start=+'+ end=+'+ skip=+\\'+ contained oneline
29 syn region MySQLString start=+"+ end=+"+ skip=+\\"+ contained oneline
30 syn region MySQLString start=+`+ end=+`+ skip=+\\`+ contained oneline
31
32 hi def link MySQLPrompt Identifier
33 hi def link MySQLTableHead Title
34 hi def link MySQLTableBody Normal
35 hi def link MySQLBool Boolean
36 hi def link MySQLStorageClass StorageClass
37 hi def link MySQLNumber Number
38 hi def link MySQLKeyword Keyword
39 hi def link MySQLString String
40
41 " terms which have no reasonable default highlight group to link to
42 hi MySQLTableHead term=bold cterm=bold gui=bold
43 if &background == 'dark'
44 hi MySQLTableEnd term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
45 hi MySQLTableDivide term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
46 hi MySQLTableStart term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
47 hi MySQLTableBar term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
48 hi MySQLNull term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
49 hi MySQLQueryStat term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
50 elseif &background == 'light'
51 hi MySQLTableEnd term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
52 hi MySQLTableDivide term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
53 hi MySQLTableStart term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
54 hi MySQLTableBar term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
55 hi MySQLNull term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
56 hi MySQLQueryStat term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
57 endif
58
59
60 " *******************************************************************************************************************
61 " Bash **************************************************************************************************************
62 " *******************************************************************************************************************
63
64 " Typical Prompt
65 silent execute "syn match ConquePromptLine '" . g:ConqueTerm_PromptRegex . ".*$' contains=ConquePrompt,ConqueString oneline"
66 silent execute "syn match ConquePrompt '" . g:ConqueTerm_PromptRegex . "' contained oneline"
67 hi def link ConquePrompt Identifier
68
69 " Strings
70 syn region ConqueString start=+'+ end=+'+ skip=+\\'+ contained oneline
71 syn region ConqueString start=+"+ end=+"+ skip=+\\"+ contained oneline
72 syn region ConqueString start=+`+ end=+`+ skip=+\\`+ contained oneline
73 hi def link ConqueString String
74
75 " vim: foldmethod=marker