File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
function ! htl_syntax#amend (options )
2
2
3
- let l: css_templates = (exists (' g:htl_css_templates' ) && g: htl_css_templates )
4
- let l: all_templates = (exists (' g:htl_all_templates' ) && g: htl_all_templates )
3
+ let l: css_templates = (exists (' g:htl_css_templates' ) && g: htl_css_templates )
4
+ let l: all_templates = (exists (' g:htl_all_templates' ) && g: htl_all_templates )
5
5
6
6
if exists (' b:current_syntax' )
7
7
let s: current_syntax= b: current_syntax
@@ -11,7 +11,8 @@ function! htl_syntax#amend(options)
11
11
syn include @HTMLSyntax syntax/html.vim
12
12
unlet g: main_syntax
13
13
" we let/unlet g:main_syntax as a hack to prevent syntax/html.vim from
14
- " re-sourcing syntax/javascript.vim
14
+ " re-sourcing syntax/javascript.vim. It also prevents syntax/html.vim from
15
+ " ovoverridding syn-sync.
15
16
if exists (' s:current_syntax' )
16
17
let b: current_syntax= s: current_syntax
17
18
endif
@@ -21,7 +22,11 @@ function! htl_syntax#amend(options)
21
22
let s: current_syntax= b: current_syntax
22
23
unlet b: current_syntax
23
24
endif
25
+ let g: main_syntax = ' not css'
24
26
syn include @CSSSyntax syntax/css.vim
27
+ unlet g: main_syntax
28
+ " we let/unlet g:main_syntax to prevent syntax/css.vim from overridding
29
+ " syn-sync.
25
30
if exists (' s:current_syntax' )
26
31
let b: current_syntax= s: current_syntax
27
32
endif
You can’t perform that action at this time.
0 commit comments