Enable swapping commentstrings between HTML and GLSL shaders
This commit is contained in:
parent
ddaae365d7
commit
a58031863e
9
init.vim
9
init.vim
@ -813,6 +813,13 @@ augroup CustomCommentDefinitions
|
|||||||
setlocal commentstring=\/\/\ %s
|
setlocal commentstring=\/\/\ %s
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
if &ft == 'html'
|
||||||
|
if join(syntaxGroups, ',') =~ 'ShaderScript'
|
||||||
|
setlocal commentstring=\/\/\ %s
|
||||||
|
elseif join(syntaxGroups, ',') =~ 'html'
|
||||||
|
setlocal commentstring=<!--\ %s\ -->
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
autocmd!
|
autocmd!
|
||||||
@ -826,7 +833,7 @@ augroup CustomCommentDefinitions
|
|||||||
autocmd FileType dot setlocal commentstring=\/\/\ %s
|
autocmd FileType dot setlocal commentstring=\/\/\ %s
|
||||||
autocmd FileType markdown setlocal commentstring=<!---\ %s\ -->
|
autocmd FileType markdown setlocal commentstring=<!---\ %s\ -->
|
||||||
autocmd FileType html.epl setlocal commentstring=%#\ %s
|
autocmd FileType html.epl setlocal commentstring=%#\ %s
|
||||||
autocmd FileType vue execute 'autocmd CustomCommentDefinitions CursorMoved <buffer> :call SetCommentString()'
|
autocmd FileType vue,html execute 'autocmd CustomCommentDefinitions CursorMoved <buffer> :call SetCommentString()'
|
||||||
" autocmd CursorMoved * :call SetCommentString()
|
" autocmd CursorMoved * :call SetCommentString()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user