Vim, listchars not displaying tabs at the begin of the line

2

I use listcharsin my .vimrcto see the whitespace. My current setting is :

set list listchars=nbsp:¤,tab:>-,trail:¤,extends:>,precedes:<

And that give to me, for example this :

>---Foo bar >---vim¤>---

But I would like this thing:

    Foo bar >---vim¤>---

But I don't know how to get this behavior.

Thank you.

Guillaume

Posted 2012-12-11T22:01:46.847

Reputation: 145

Don't use tabs for indenting. – romainl – 2012-12-12T06:58:11.807

Answers

0

You can't. The 'listchars' setting applies globally; you cannot suppress it for parts of the buffer.

Alternatively, you could :set nolist and instead use custom matches (:match) to highlight the whitespace in the positions you want. But if you wanted replacement with different characters, not just different colors, you'd have to use :syntax together with the new conceal feature, but those additional syntax definitions may then interfere with the filetype's default syntax.

So in the end, the only way to really achieve this is through modifying Vim's sources and recompiling a custom version for you.

Ingo Karkat

Posted 2012-12-11T22:01:46.847

Reputation: 19 513