Skip to content

Commit

Permalink
make cssDefinition region modification slightly less hackish
Browse files Browse the repository at this point in the history
  • Loading branch information
ap committed May 20, 2011
1 parent a513ae7 commit abd0a4f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions after/syntax/css.vim
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,16 @@ endfunction

if has("gui_running") || &t_Co==256
" HACK modify cssDefinition to add @cssColors to its contains
redir => s:olddef
silent! syn list cssDefinition
redir => cssdef
silent! syn list cssDefinition
redir END
if s:olddef != ''
let s:b = strridx(s:olddef,'matchgroup')
if s:b != -1
exe 'syn region cssDefinition' strpart(s:olddef,s:b).',@cssColors'
endif
if len( cssdef )
for out in split( cssdef, "\n" )
if out !~ '^cssDefinition ' | continue | endif
let out = substitute( out, ' \+xxx \+', ' ', '' )
let out = substitute( out, ' contains=\zs', '@cssColors,', '' )
exe 'syn region' out
endfor
endif

" w3c Colors
Expand Down

0 comments on commit abd0a4f

Please sign in to comment.