1

Does hi link XXX Normal provide any benefits? For example the syntax file included by default syntax/vim.vim includes the line:

hi def link vimUserFunc Normal

This often conflicts with CursorLine highlighting since Normal often sets a different background color than CursorLine e.g.

hi Normal guifg=#ffffff guibg=#000000
hi CursorLine guibg=#111111

Removing the link does not seem to have any immediately obvious adverse effects.

Are there any benefits that I am not aware of?

2

Without a highlight, it could be highlighted by a different syntax group that might contain it. My guess is that vimUserFunc was meant to look like normal text so it wouldn't be highlighted like built-in functions.

If by removing it, you mean deleting the line in $VIMRUNTIME/syntax/vim.vim, you shouldn't. You can clear it with :highlight clear vimUserFunc in a script like after/syntax/vim.vim. I doubt this will be the only occurrence of this, though.

This often conflicts with CursorLine highlighting since Normal often sets a different background color than CursorLine e.g.

Getting CursorLine to look "right" is an uphill battle. By default Normal isn't set. Most of the stock themes don't actually set a background for anything unless its meant to stand out (e.g. Error, Search, etc.), in which case, inconsistency with the CursorLine background shouldn't be a concern.

If anything, setting a background color on Normal is creating your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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