I have normally set up my
listchars to make tab characters and trailing spaces visible. In my
~/.vim/vimrc I have:
set listchars=tab:»\ ,trail:·
Now there are certain file types where tabs are common and I just want to display them using spaces, so I put the following in the corresponding
setlocal listchars=tab:\ \ ,trail:·
The problem is when I have splits with two different file types open, it seems that despite using
setlocal, tabs are not visible anymore for all open files, not just the one with the custom file type.
I don't want to
setlocal nolist (here
setlocal seems to do what I expect) for the custom file type, because I still want to see trailing spaces.
How can I achieve different
listchars per split pane? (Or something equivalent without using