Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM: How to change the Showbreak Highlight color without using the NonText Color-element

I noted that the 'showbreak' symbol is highlighted with the highlight "NonText" color-element. NonText is also used for the EOL Characters.
I would like to keep the highlight-color for the EOL characters but want to change it for the showbreak symbol is that possible?

Another problem is that my showbreak symbol is not displayed. I would like to use this symbol "↳" and put it in the linenumbers column (using set cpoptions+=n). I can't find out how to display the symbol and how to put a space after the showbreak symbol (between the text and the symbol).

Can anyone help me?

like image 775
Reman Avatar asked Apr 21 '11 16:04

Reman


1 Answers

I don't think you're going to get highlighting to be different than the EOL character, at least I am not aware of a way to do that.

For the second part I can help with. I was able to get "↳ " to show up in my line number column with the following settings:

let &showbreak = '↳ '
set wrap
set cpo=n

Note that there is a space after the . This lines up nice until you have > 9 lines in the file. If you wanted it to line up with the last character of the number column regardless of the number of lines I'm not sure what you're going to have to do.

Edit: I've recently written a proof-of-concept function for someone on IRC that highlights the first character on a line that has been wrapped with a different highlight group. It hasn't been tested much but it seems to work. Not exactly what you're looking for but maybe it's worth a look.

like image 65
Randy Morris Avatar answered Sep 30 '22 09:09

Randy Morris