5

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.

geekowl
  • 331
  • 1
  • 6
  • 17
  • 1
    I am having the same problem. Taking your suspicion, I changed cygwin terminal to vt100 (right click title bar -> Options -> Terminal) and saw the problem go away. – Parag Doke Aug 03 '15 at 09:44
  • This poster had the same issue and solved their problem. http://stackoverflow.com/a/31802751/4390071 – Michael Vessia Aug 05 '15 at 14:10

2 Answers2

2

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!

Jonathan Lee
  • 116
  • 1
  • 9
1

problem with escape sequences when restoring the cursor position from a file .viminfo by older xterm clients my solution - insert in .vimrc :

set noek
function Mode()
set ek
endfunction

au InsertEnter * call Mode()
au InsertChange * call Mode()
au InsertLeave * call Mode()
Evgeny
  • 11
  • 1