I am using vim under Ubuntu under the windows WLS. When I edit SQL files, only inside comments - the word "note" is always highlighted with a background yellow color. This includes, for example, if I say :nohl, or I search for something etc. And it is just the word "note", nothing else. Not, for example "noted". I would like to stop this behaviour, but am unable to find where it is coming from. The only option so far is to turn off highlighting entirely - but I do like the syntax highlighting for programming.

1 Answer 1



:hi link sqlTodo sqlComment

to .vim/after/ftplugin/sql.vim or


augroup NO_TODO | au!
    au FileType sql :hi link sqlTodo sqlComment
augroup END

to your .vimrc.

Why NOTE, TODO, FIXME and XXX are highlighted?

Usually most vim syntax files have a kind of Todo group included into Comment to be highlighted differently.

For example, sql filetype has these lines:

" Comments:
syn match sqlComment    "--.*$" contains=sqlTodo,@Spell
" Todo:
syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained
hi def link sqlTodo     Todo

Which includes sqlTodo into sqlComment and highlights sqlTodo as Todo.

  • 1
    I don't yet have the reputation to up vote -- but I used the .vimrc approach and it worked. So thanks.
    – Bruce
    Oct 25, 2021 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.