37

On several new CentOS 7 machines, I find that VIM automatically starts in replace mode.

After removing all automatically installed .vimrc files, normal behavior returns. However, if I simply create a .vimrc (eg. touch ~/.vimrc), VIM will begin starting with replace mode enabled by default…

Giacomo1968
  • 58,727
Michael
  • 651

2 Answers2

38

Seems to be an issue with utf-8 ambiguous characters and Windows cmd console. Flag t_u7 is set by default and so vim will request cursor position and get a bad reply from the ssh client.

Workaround: Adding set t_u7= or set ambw=double to your vimrc should fix the problem. set t_u7= will disable requesting cursor position and ambw=double will set the ambiguous characters mode to double.

For more info see vim reference manual: https://vimhelp.org/term.txt.html

Zoran Bikicki
  • 481
  • 4
  • 2
18

I have just identified that the issue only occurs when connecting to the remote system using the native OpenSSH client released with Windows 10 1709 using the ConEmu terminal emulator. If I use the same client with native powershell or cmd there is no difficulty - appears to be an issue with ConEmu. Hopefully this helps someone else.

Michael
  • 651