Move comment highlighting to 'after/syntax'

master
Hektor Misplon 2023-05-12 14:32:57 +02:00
parent 77f58140a1
commit 5b801ed608
5 changed files with 11 additions and 9 deletions

View File

@ -0,0 +1,5 @@
syn match Todo /TODO/
syn match Todo /FIXME/
syn match Todo /FIX/
syn match Todo /QUESTION/
syn match Todo /NOTE/

View File

@ -19,3 +19,5 @@ syn match pandocUListItem /^>\=\s*[*+-]\s\+-\@!.*$/ nextgroup=pandocUListItem,pa
syn match TaskWikiTaskUuid containedin=TaskWikiTask /\v#([A-Z]:)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
syn match TaskWikiTaskUuid containedin=TaskWikiTask /\v#([A-Z]:)?[0-9a-fA-F]{8}$/
highlight link TaskWikiTaskUuid Comment
:runtime! syntax/_comment_keywords.vim

View File

@ -1,3 +1,5 @@
syn keyword Operator \+ conceal cchar=¬
syn keyword Operator , conceal cchar=
syn keyword Operator ; conceal cchar=
:runtime! syntax/_comment_keywords.vim

View File

@ -35,3 +35,5 @@ syn keyword Operator phi conceal cchar=φ
syn keyword Operator chi conceal cchar=χ
syn keyword Operator psi conceal cchar=ψ
syn keyword Operator omega conceal cchar=ω
:runtime! syntax/_comment_keywords.vim

9
.vimrc
View File

@ -525,15 +525,6 @@ augroup vimStartup
augroup END
" Highlight todo's for every filetype
" https://stackoverflow.com/questions/11709965/vim-highlight-the-word-todo-for-every-filetype
augroup HiglightTODO
autocmd!
autocmd WinEnter,VimEnter * :silent! call matchadd('Todo', 'TODO', -1)
autocmd WinEnter,VimEnter * :silent! call matchadd('Todo', 'FIXME', -1)
autocmd WinEnter,VimEnter * :silent! call matchadd('Todo', 'QUESTION', -1)
augroup END
augroup Vim
au!
" Reload vim config when ~/.vimrc is changed