Konrad Rudolph
Konrad Rudolph

Reputation: 545518

Using linebreak and line options at the same time

The documentation of linebreak says:

This option is not used when the 'wrap' option is off or 'list' is on.

I find this unsatisfactory. Is there a workaround to use certain listchars and linebreak?

My ideal .vimrc looks like this:

set linebreak
set list
set listchars=tab:▸–,trail:·,extends:»,precedes:«,nbsp:⍽

… so I’m not actually interested in eol:$, which is presumably the reason why list conflicts with linebreak (that’s just my assumption but I see no other plausible reason for them to conflict).

There’s a closely related question but in that the OP specifically wants the EOL mark, and the accepted answer addresses only this, so it’s not useful for me.

Upvotes: 3

Views: 148

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172510

I would guess (but do not know for sure) that the current implementation cannot deal with the change of the displayed width when a Tab character shrinks to ^I (assuming it has no value in 'listchars'). In any way, I think Vim could be enhanced to do just what you want, though it might not be easy to implement. It might be worth to raise this request on the vim_dev mailing list.

There are little good workarounds; one could theoretically use the new conceal feature to emulate certain things of :set list, but it interferes with syntax highlighting and there's only one choice for highlighting.

Upvotes: 1

Related Questions