问题
I use vim in Cygwin terminal. It was working fine. Recently, I added a package in Cygwin which caused update of vim and some other components. Now when I open any file in vim, the first character in the file gets replaced with character 'g'.
I tried removing .vimrc and all files in .vim folder in my home folder. But the problem persists.
To understand the problem, I opened a file using 'vim -E'. On opening, I see the following at the bottom of the window:
Entering Ex mode. Type "visual" to go to Normal mode.
:]11;rgb:0000/0000/0000\
The key sequence rgb in vim would replace the first character with 'g'.
This problem seems to be related to xterm configuration. But I cannot figure it out.
How can I resolve this problem?
Thank you in advance for your help.
Update:
I added the following line in ~/.vimrc :
colorscheme default
This solved the problem.
回答1:
I'm not sure what the problem is. But I tried to reinstall 7.4.752-1 version of vim and vim-common, this problem disappeared. Hope this help you!
Updated on 20150806: upgrade to 7.4.808-1 will fix the problem!
来源:https://stackoverflow.com/questions/31775203/vim-in-cygwin-replaces-first-character-with-g-on-opening-a-file