2

I'm currently using the following listchars I found on vim casts:

set listchars=tab:▸\ ,eol:¬

I'd like to make tab be ▸ followed by 3 spaces, but I can't seem to get it to work. I've tried the following:

set listchars=tab:▸\ \ \ ,eol:¬
set listchars=tab:▸\   ,eol:¬
set listchars=tab:▸<Space><Space><Space>,eol:¬

All throw errors. Is this possible?

2

No, this is not possible. :help 'listchars' explicitly states that the tab portion of the option must be exactly two characters:

tab:xy  Two characters to be used to show a tab.  The first
        char is used once.  The second char is repeated to
        fill the space that the tab normally occupies.
        "tab:>-" will show a tab that takes four spaces as
        ">---".  When omitted, a tab is show as ^I.
| improve this answer | |
5

The visible width of the <Tab> character with :set list is determined by the (variable) width that the character normally occupies. If you want to ensure that a (full) tab is represented by your symbol and 3 spaces, just make sure that the tab width is 4 characters:

:set ts=4
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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