2
FreeBSD-12.1p5
vim-8.2

I have a zfs clone of an iocage thick jail that I am using for testing. When I open a file with vim in character mode and I use :wq to save my changes then I see these characters in place of those expected (/usr/:)

[>4;mlocal/etc/smb4.conf" 24L, 672C written

There is a missing glyph character (a single square box one character in width and height with hex decimal characters [0..F] inside) that is positioned immediately before the [ character in the sample given above. This character disappears when this message is displayed.

This does not happen if I use :w by itself, only when I use :wq. It appears that vim actually displays the correct string when I use :wq but that the first few characters are immediately overwritten.

This is not a problem with the file name or path, only with what vim displays when saving.

I have not encountered this before. Why are these characters messed up when vim displays the name of the file it is saving?

I have verified all packages are intact and all dependencies installed. I have also reinstalled vim. The problem remains.

Rob
  • 14,746
  • 28
  • 47
  • 65
James B. Byrne
  • 1,048
  • 12
  • 27
  • 1
    That's supposed to be an [escape sequence](http://ascii-table.com/ansi-escape-sequences-vt-100.php). Not sure where the problem is though. – Richard Smith May 16 '20 at 06:52
  • What do you have `$TERM` set to? Are you using vim in the FreeBSD console or a terminal emulator, if so which? Consider using a different setting for `$TERM` (such as `xterm` or `vt100`) or also use a different terminal emulator to see if you still have the same issue... – filbranden May 16 '20 at 22:20
  • 1
    I have the same problem, that started a few weeks ago, but I thought it was caused by ssh'ing into a FreeeBSD box from a Linux box I'm testing with and it was a Linux issue. But questions about the Linux operating system and its utilities are off topic here and should, instead, be asked on https://unix.stackexchange.com/ Please delete this and ask over there. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) – Rob May 17 '20 at 12:48
  • Vim is the software that I am having a problem with and it is not clear to me that the problem is specific to FreeBSD. And vim is a software development tool, at least that is how I view it. In my opinion this more likely has something to do with locales than with the OS but I do not know what. – James B. Byrne May 19 '20 at 14:13

1 Answers1

0

Should be resolved by adding these lines to your .vimrc:

set t_TI=
set t_TE=
James Risner
  • 5,451
  • 11
  • 25
  • 47