vim in Cygwin replaces first character with 'g' on opening a file

爱⌒轻易说出口 提交于 2019-12-12 08:55:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!