Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

vim

vi

cygwin

xterm

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.

like image 729
geekowl Avatar asked Oct 31 '22 22:10

geekowl


1 Answers

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!

like image 80
Jonathan Lee Avatar answered Nov 15 '22 03:11

Jonathan Lee