Monday, November 17, 2014

Re: syntax highlighting for empty lines

On Mo, 17 Nov 2014, Ben Fritz wrote:

> On Saturday, November 15, 2014 4:15:32 PM UTC-6, Jacky Alciné wrote:
> > The effect is for programming, it's meant to not be intrustive and be more of an auxiliary kind of thing. With good syntax highlighting and a good color scheme, it's the best.
> >
>
> The OP wants a solid background color line if the line is empty.
>
> You cannot possibly achieve this with list mode.
>
> The only way to highlight an entire empty line, is to place a sign defined with linehl used to define a background color.
>
> This sign will move around as the line moves around (good) but you must place it manually or write your own script to do it on cursorhold or something. It's possible there is an existing plugin but I don't know of one.

My DynamicSigns plugin (https://github.com/chrisbra/DynamicSigns) can do
this:

:SignExpression getline(v:lnum)!~#'.'?'Line':0

(which means, use the 'Line' sign for highlighting empty lines.)

Best,
Christian
--
Wenn wir unseren Leidenschaften widerstehen, danken wir es mehr ihrer
Schwäche als unserer Stärke.
-- François Duc de La Rochefoucauld

--
--
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/d/optout.

No comments: