summaryrefslogtreecommitdiff
path: root/vim/.vim/after/syntax/vim.vim
blob: 78e8d3775027ca26fe063847db0d6245742d067e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
" Modification of default rule: vimHiCtermFg,vimHiCtermBg instead of vimHiCtermFgBg
syntax cluster vimHiCluster remove=vimHiCtermFgBg
syntax cluster vimHiCluster add=vimHiCtermFg,vimHiCtermBg

" Modification of default rule: @vimHiNmbrFgCluster,@vimHiNmbrBgCluster instead of vimHiNmbr
syntax match vimHiCtermFg /\cctermfg=/ contained nextgroup=@vimHiNmbrFgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syntax match vimHiCtermBg /\cctermbg=/ contained nextgroup=@vimHiNmbrBgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
hi def link vimHiCtermFg vimHiCtermFgBg
hi def link vimHiCtermBg vimHiCtermFgBg

" Assemble syntax groups
let syntax_groups_fg = "vimHiNmbrFg1"
let syntax_groups_bg = "vimHiNmbrBg1"
for i in range(2, 255)
 let syntax_groups_fg = syntax_groups_fg.",vimHiNmbrFg".i
 let syntax_groups_bg = syntax_groups_bg.",vimHiNmbrBg".i
endfor

exe "syntax cluster vimHiNmbrFgCluster contains=".syntax_groups_fg
exe "syntax cluster vimHiNmbrBgCluster contains=".syntax_groups_bg

for i in range(1, 255)
    exe "syntax match vimHiNmbrFg".i." /".i."/ contained"
    exe "syntax match vimHiNmbrBg".i." /".i."/ contained"
endfor