0

I have 2 Linux servers (SLES 12.5):

  • On the first server I have vim version 7.4.326,
  • On the other vim version 9.0.813.

If I open the same file on both servers, Vim behaves differently.

On server with Vim version 7.4.326 : enter image description here So, everything is fine.

But on server with Vim version 9.0.813 : enter image description here

Could somebody explain me what I'm doing wrong ?

Many thanks

Vivian De Smedt
  • 16,336
  • 3
  • 18
  • 37
lazydba
  • 1
  • 1
  • 1
    Welcome to Vim :-) The content of the file looks different?! Can you confirm that the content of the file is the same? Is the content of the file modified by Vim if you just open the file and quit? Is the buffer in 'modified' state after you open it in Vim (:set modified?)? – Vivian De Smedt Feb 16 '23 at 11:24
  • 1
    Try opening the file with vim --clean – Friedrich Feb 16 '23 at 12:09
  • @VivianDeSmedt : hello, I confirm the content is the same but I can simulate the issue when creating a new file : vi test , add 2 lines (azerty on the first , 123456789 on the second line) and :wq. When I reopen the file, there is indeed a modified buffer (+ sign besides the only active buffer nr 1) and indeed, I can undo different changes after just opening the file. I'm not used to work with buffers in vim, so where is this buffer coming from ? – lazydba Feb 16 '23 at 14:02
  • It looks like a command is executed after you start Vim. Like @Friedrich propose, I would start to start Vim without plugins (using the --clean flag). – Vivian De Smedt Feb 16 '23 at 14:46
  • hmm, issue not solved when starting with option --clean. I will install older, working version on the server where I have these issues. Thx for the tips – lazydba Feb 16 '23 at 14:57
  • 1
    Try How to debug my vimrc; it's also possible there was a bug fixed between ~9.0.800 and the current version – D. Ben Knoble Feb 16 '23 at 15:34
  • @D.BenKnoble : thx for the link. The issue remains even after starting Vim with the default settings (vim -u NONE -U NONE -N) – lazydba Feb 16 '23 at 16:05
  • What's the output of type vim in your shell? Try to use the absolute path or \vim --clean in order to avoid alias or function expansion. Also are you sure it's the same file on both servers? Can you confirm by comparing their checksum? (maybe one is corrupted or has different-n-strange encoding?) – gildux Feb 16 '23 at 20:22
  • My guess is: the terminal is pretending to be xterm-compatible, but does not handle specific xterm compatible codes. You should mention what terminal you are using and try to update them to the latest version. Also check if :set t_u7= works around it – Christian Brabandt Feb 17 '23 at 07:28
  • @ChristianBrabandt : good hint : it seems I have the issue when using MobaXterm but not when using Putty. It seems we have an (very) old version of MobaXterm so I'll ask to package and distribute the latest version – lazydba Feb 17 '23 at 08:33

0 Answers0