2

I've somehow managed to have all tabs show up as the control character ^I in VIm, specifically gvim 8.1.1 on Windows 10.

Some JSON with tabs as control characters in gvim

All I have related to tabs in vimrc is this:

set tabstop=2

I do also have these lines that point to something else, so to speak, but wouldn't expect them to have an influence on tabs showing as control characters:

source $VIMRUNTIME/mswin.vim
set nocompatible
behave mswin

I did have the following, but after thinking there could be some interaction (1, 2, 3), commented it out and still see the control characters:

" highlight tabs and trailing spaces
"set listchars=trail:-
"set list
4
  • 2
    But is list still active? What do you get from command :set list?, does it tell you nolist? If you run :set nolist, does the problem go away?
    – filbranden
    Feb 6, 2019 at 14:13
  • Thank heavens, you're onto it. It is still list when I :set list?. :set nolist within gvim does fix it. Strangely, however, set nolist in my _vimrc makes no change. There is nothing about lists set in .gvimrc. Where else would this be set?
    – ruffin
    Feb 6, 2019 at 15:02
  • @filbranden That's it. I had another vimrc in my home dir that overrode what was in the same folder as vim81 and vimfiles. Thank you for the sanity check. Want to submit "Well, it is set nolist, but also check that you're setting it in the right place" as an answer?
    – ruffin
    Feb 6, 2019 at 15:14
  • 1
    An useful command is: :verbose set list? It shows the value and where it was last set.
    – Ralf
    Feb 6, 2019 at 15:35

1 Answer 1

2

This is caused by set list. You can check that it is enabled with:

:set list?

And you can turn it off with:

:set nolist

(That should confirm that the problem goes away.)

Even though you commented the one in your .vimrc, it is possible the setting is coming from another initialization file, so you should look for that.

See this question for help on how to debug your .vimrc file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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