Strange vim startup behavior when accessed via cygwin ssh
Weird problem:
Text is automatically entered into my vim session within a few seconds of vim starting up. This is really annoying because when I open an existing document it can cause changes to the document that I then have to undo. If the automatically entered text messes up my automatically generated folds I have to restart vim to get them back. What's really weird is the problem only seems to occur when using vim over ssh. I run WindowMaker 0.92 on Cygwin X Server 1.7.3 with Windows XP. I ssh in an xterm. The remote host is Debian Testing with Kernel 2.6.30-2-686. The remote VIM is 7.2. If I press "i" really fast on vim startup I can get a sample of the text that is automatically entered. It appears to be something I typed into vim at some point in the past. It includes LaTeX commands since that's mostly what I use vim to write. Here is a sample copied from Cygwin into XP so the encoding is messed up but it will give you a good idea: Quote:
Here is my .vimrc: Quote:
This line looks particularly suspect, but I don't see what my problem has to do with color: if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" |
I'm not a vim expert but I'm sure someone will shoot this down.
Could there be some commands being sent that replay a recording or reload a previous register in vim ? I see your .vimrc has this line set viminfo='20,\"50 " read/write a .viminfo file, don't store more than " 50 lines of registers Maybe it's worth seeing if such a register exists and if its contents match the bad input. At least you'll know it's not a ghost ! Or it could be that your terminal is replaying some old content after vim is opened. Anyway, this seems like a useful site for vim commands http://successtheory.com/tips/vimtips.html Towards the bottom of the page are the commands for displaying the contents of registers and cleaning them out. for example @q executes a recording or register. If your terminal is sending such characters unseen then it may cause your problem. Just speculating myself really. regards Alan |
It looks like the problem is coming from the "#Registers" section of my .viminfo. So why is it only getting dumped into my buffer when I use cygwin/ssh? Note some of my registers were very long, probably due to my pressing q and not noticing it.
I don't want to disable my .viminfo file, nor do I want to disable storing registers across sessions. I think the line you pointed out just limits the length of the registers. In the mean time, I have tried deleting the existing registers. We will see if the problem comes back. |
Deleting the existing registers did not help. I was careful to remove them using a program other than vim since editing .viminfo with vim will cause your work to be automatically undone. I think I can rule out a malformed register as the cause. Any new ideas?
|
Anyone else have any ideas?
|
All times are GMT -5. The time now is 07:12 PM. |