Why vim is changing first letter to g after opening a file

前端 未结 8 1857
野趣味
野趣味 2021-02-12 10:04

When I open a file, eg vim .bashrc, vim opens the file and change the first letter to g. What I see is the following:

g To the extent p         


        
相关标签:
8条回答
  • 2021-02-12 10:38

    Strange enough, but it works for me. I created a ~/.vimrc file:

    syntax on   
    set background=dark
    

    The 2nd option disable the bug.

    0 讨论(0)
  • 2021-02-12 10:42

    So it appers to be a vim issue. So far I gathered only two solutions:

    • Reinstall to older version of vim. i reinstalled to 7.4.752-1 and bug is gone.
    • Change cygwin terminal to anyone but "xterm*" (right-click on title bar -> Options... -> Terminal -> Type)
    0 讨论(0)
  • 2021-02-12 10:49

    make sure you dont set the visual bell in your .vimrc

    set visualbell
    

    in case you have it then just delete it :)

    0 讨论(0)
  • 2021-02-12 10:49

    I am on ArchLinux. vim 8.0.0987-1 always decreases a number upon opening a file (as if xtrl+x pressed). Downgrade to 8.0.0722-1 fixed the issue.

    0 讨论(0)
  • 2021-02-12 10:50

    I had the exact same problem

    I found out it was a bug in my ssh client (mobaXterm).

    Updating (to mobaXterm 'personal edition v9.1') resolved the issue.

    0 讨论(0)
  • 2021-02-12 10:53

    The exact same thing was happening to me! It wasn't occurring in gvim, so I thought maybe something was going on in my .vimrc. I zeroed-out my .vimrc but it was still happening. Only when I completely deleted my .vimrc did this behavior stop. As suggested,I rolled back to an older version (7.3.1152-1) with cygwin setup and that fixed it. I did not have to change any terminal settings, however. It makes sense because I updated cygwin yesterday, when I started seeing the errant g's.

    0 讨论(0)
提交回复
热议问题