Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Don't use tabs for indenting. –  romainl Dec 12 '12 at 6:58

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.