0

In my .vimrc file I have listchars set to showing tabs and trailing spaces.

set listchars=trail:~,tab:>-

How do I change my settings for the file I currently have open to stop showing the tabs?

3
  • 1
    > stop showing one or two, "one or two" what?
    – Mass
    Sep 3 '20 at 15:47
  • 1
    I thought the context of my question would make that clear but I suppose not. My bad. I meant one or two of the characters from the listchars group Sep 3 '20 at 15:49
  • 1
    Welcome to Vi and Vim! Can you please be more specific? For instance, list your current 'listchars' setting and tell us which one you would like to stop showing? Or an example of a file with :set list enabled and the specific display you would like to disable?
    – filbranden
    Sep 3 '20 at 15:56
1

In vim, listchars is a global setting, so it is not possible to configure it per-window.

It is possible however to turn on and off list, using setlocal list and setlocal nolist.

In neovim, listchars is a global or local-to-window setting. So to configure it per window you merely need to use

setlocal listchars=eol:c
3

Starting with Vim 8.2.2518, 'listchars' is a global or local-to-window setting. So you can use 'setlocal' to set a window-local 'listchars' setting.

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.