diff --git a/init.vim b/init.vim index 3d0c077..db810f5 100644 --- a/init.vim +++ b/init.vim @@ -813,6 +813,13 @@ augroup CustomCommentDefinitions setlocal commentstring=\/\/\ %s endif endif + if &ft == 'html' + if join(syntaxGroups, ',') =~ 'ShaderScript' + setlocal commentstring=\/\/\ %s + elseif join(syntaxGroups, ',') =~ 'html' + setlocal commentstring= + endif + endif endfunction autocmd! @@ -826,7 +833,7 @@ augroup CustomCommentDefinitions autocmd FileType dot setlocal commentstring=\/\/\ %s autocmd FileType markdown setlocal commentstring= autocmd FileType html.epl setlocal commentstring=%#\ %s - autocmd FileType vue execute 'autocmd CustomCommentDefinitions CursorMoved :call SetCommentString()' + autocmd FileType vue,html execute 'autocmd CustomCommentDefinitions CursorMoved :call SetCommentString()' " autocmd CursorMoved * :call SetCommentString() augroup END