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

10
  • 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?)? Commented Feb 16, 2023 at 11:24
  • 1
    Try opening the file with vim --clean
    – Friedrich
    Commented Feb 16, 2023 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
    Commented Feb 16, 2023 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). Commented Feb 16, 2023 at 14:46
  • 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
    Commented Feb 16, 2023 at 15:34

0

Your Answer

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

Browse other questions tagged or ask your own question.