Forums

VIM starting in replace mode

When launching vim in bash console, it starts in replace mod by default. Is there a way to make it start in normal mode?

I didn't make any changes to the original vimrc and even without one the problem remains. I've tried this, this and this among others.

I have vague memories of this not being an issue before. Does anyone else experiences it?

I have seen that myself in the past. I think what happens is that the history buffer for our consoles gets some kind of strange escape sequence in it, and that gets played to vim when it's opened -- but I don't quite see how it could happen or have that effect. IIRC it is fixed by closing the bash console in question, then starting a new one -- could you try that and see if it helps?

I find the simplest solution is not to use vim to edit files

@giles

Restarting the console was one of the first things that I've tried. The problem persists across consoles/sessions, even after purging .bash_history and .viminfo.

But it does not persist across browsers. The behaviour shows only in Firefox (only checked 64.0), even in incognito mode. Works fine in Chrome and Edge.

Hmmm, that's weird. Maybe it's something in the browser cache? Even in incognito mode, some elements of the cache from non-incognito mode are shared (nothing is shared in the other direction, of course). So if you delete all pythonanywhere-related content from your Firefox cache, perhaps it will sort it out?

I went the extra mile and deleted all cache and cookies. Additionally I've disabled blocking of tracking cookies. It didn't change the behaviour.

This leads me to believe it's an issue with Firefox . Maybe a new version will change something.

That's really weird! Which version of Firefox are you using? I'm on my home machine at the moment, and don't have FF installed, but I do at work, so I can do a comparison of different versions when I'm in the office tomorrow.

I'm running Firefox Quantum 64.0. Just to be on the safe side I've disabled all extensions, but that changed nothing.

Very odd. I've just checked myself with Firefox 64, and I don't get that problem. Maybe as an experiment you could sign up for another account (just a free one, of course) and see whether you get the same behaviour in your FF?

Ok, so I'm back with some resoults. Created a new account and logged in using the same computer and the same browser. And to my surprise - the behaviour was not replicated. Vim started in normal mode, just as one would expect.

This is very puzzling. I'll try to compare user config files from both accounts and see if there are any differences...

This is something that I've encountered a few times and every time I try to track it down, it magically goes away before I can find out what's causing it. It's really frustrating.