2

In all files I open with vim, I see a strange 1/2 symbol showing up on the second line, but only if the second line contains a unix linebreak. It always appears on line 2 of the file. The character is neither editable nor selectable.

I'm using a fresh vanilla Debian 10 install with no modifications to any vimrc files and no .vimrc in my user dir. Actually I just created my .vimrc file and it made no difference.

See pic:

enter image description here

Edit 1:

I'm now also seeing ;?;? at the beginning of all new files and files that begin with an empty unix linebreak. Like the 1/2 symbol, these characters are neither editable nor selectable.

In the below pic, deleting the leading empty line will cause the ;?;? to disappear and 1/2 to reappear on an empty line 2 after closing/reopening the file.

enter image description here

Edit 2:

Answering questions from the comments:

  1. Here is a pastebin of od -cx /etc/apt/sources.list, the source of the first screenshot.
  2. My terminal software is SecureCRT, with setting in options Terminal > Emulation = Xterm. These extra characters do not appear when using a vanilla version of PuTTY.
  3. The output of vim's :help startup-terminal|set term is term=xterm.
  4. My locale from cat /etc/default/locale = LANG="en_US.UTF-8"
6
  • Two important things for answerers here are missing from the question: what terminal emulator is in use and what VIM thinks the terminal type to be.
    – JdeBP
    Oct 3, 2020 at 20:26
  • :help startup-terminal|set term, and your terminal emulator is either XTerm or SecureCRT. It cannot be both. They are two different softwares. If it's SecureCRT, then you also need to tell answerers what emulation you have chosen to set it to.
    – JdeBP
    Oct 4, 2020 at 5:51
  • The output of :help startup-terminal|set term is term=xterm. My terminal software is SecureCRT. Inside its' settings is a section called Terminal > Emulation = Xterm.
    – Jeff
    Oct 4, 2020 at 9:36
  • I suspect that groups.google.com/forum/#!msg/vim_dev/ciKI2MXoww4/Zi6UuVwCCQAJ gives further clues, and that you'll discover that this doesn't happen if you pick "Linux" as the emulation and linux as your terminal type.
    – JdeBP
    Oct 4, 2020 at 22:20
  • Good stuff. The 1/2 character is still there, but the ;?;? is gone now. Anyone think this is a vim bug? SecureCRT bug? General terminal emulation problem? PuTTY doesn't show these characters.
    – Jeff
    Oct 5, 2020 at 0:22

1 Answer 1

0

Changing the SecureCRT character encoding in Session > Properties > Terminal > Appearance from Default to UTF-8 fixed the problem.

Also, changing the SecureCRT Session > Properties > Terminal > Emulation > Terminal from Xterm to Linux also fixed the problem, but with a 16-color terminal restriction.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .