Friday, September 6, 2013

Seletively limit CursorLine colors and/or set precedence of :hi groups

I always have trouble finding where the cursor is in a large window, especially of syntax highlighting is used. I recently discovered cursorline and cursorcolumn (thanks, Tony), which helps.

However, cursorcolumn has some distracting effects. The highlight colours I use for cursorcolumn seems to override those for syntax highlighting, folds, and search highlighting. It can look very strange; cognitively, it causes seemingly random characters to leap out of the page, making it hard to compose a report in (say) LaTeX.

I suspect that ideal solution is for the ":hi CursorColumn guifg=... guibg=..." to take effect only where Normal colours are in effect -- not where there is Search highlighting or folds. This means that CursorColumn highlighting takes effect even at page positions where syntax colouring is in effect. I can't actually try this to check that it has the desired cognitive effect. Is there a way to achieve this?

As a second related question, can :hi colours be specified in such a way that some groups take precedence over others? If so, I can achieve the desired effect by specifying the precedence of :hi groups.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment