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

前端 未结 8 1858
野趣味
野趣味 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 11:00

    I am using vim on Ubuntu Linux 16.04 via MobaXterm version 7.7. This is an older version of MobaXterm that supports command-line-settable terminal background colors.

    The following change to my .bash_profile solved this problem for me:

    # Fix for Vim 8.0 bug that stomps on line 1 char 1:
    export TERM=linux
    
    0 讨论(0)
  • 2021-02-12 11:04

    For me, I traced the issue down to the following line:

    set nocompatible
    

    It is found in /usr/share/vim/vim74/debian.vim, which is included from /etc/vim/vimrc with the line runtime! debian.vim

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