Edit 4: I think I’ve fixed the issue. I uninstalled vim, deleted ~/.viminfo
and /etc/vimrc
, then reinstalled vim. I jumped around a file a bit, went in and out of edit mode, and type a bunch of ~
and it didn’t jump the text around at all. Still not sure what I did, but it appears this variation of turning it on and off again worked.
I’m hoping someone can help me with this.
I was holding my laptop while I had a vile open in vim, and I slipped, mashing a bunch of keys on the keyboard by mistake.
After doing this, I can’t type the ~
character anymore. Anytime I try to type it, it jumps the text to the last line, putting the last line at the top of the editing screen so that’s the only line of text showing.
I thought maybe I had set an option that would show up in ~/.vimrc
, but there’s no ~/.vimrc
file. There is a /etc/vimrc
file, and a ~/.viminfo
file.
I’ve searched and had no luck finding out what I did to cause this behavior. I also tried looking through the vim manpage and couldn’t find any info there either.
Edit 3: I just installed neovim and in neovim it acts as expected when I type the ~
. Something I did notice is that in vim, I now have a blinking block cursor in insert mode as well as in visual mode, while in neovim, it’s a block cursor in visual mode and a vertical bar cursor in insert mode. I think this was the normal behavior in vim prior to whatever the heck I did.
Hoping someone knows what the heck I did. Thank you!
Edit: clarified what happens when I try to type ~
Edit 2: added details of the .vimrc
and .viminfo
files
I checked the locale and it is correct. I’m on Arch, and I just installed neovim to compare the cursor and typing behaviors, and in neovim it acts as expected when I type the
~
.I did notice that in vim, I now have a blinking block cursor in insert mode as well as in visual mode, while in neovim, it’s a block cursor in visual mode and a vertical bar cursor in insert mode. This was the normal behavior in vim prior to whatever the heck I did.
Edit: grammar
Yeah, probably best bet is to uninstall and purge settings. Depending on the district you’re using and it’s package manager, you it may be as simple as apt purge vim. And just to be sure remove all vimrc files from all user home folders including root.