Esc key does not take me out of insert mode in vi, vim, gvim

Hi. I am using Manjaro with a KDE Plasma desktop. This is a recent installation, as in this weekend. (Mar. 2-3()

My go-to editors are Gvim in graphical, and vi in the console. No problems for the first little while, but now the ESC key does not take me out of Insert mode.

I just used the menu editor to check keyboard shortcuts for all my applications, not noticing anything untoward. I am a big fan of keyboard shortcuts, and they are one thing I do early after an install.

One thing I did was install neovim and neovimqt with the Add / Remove Software app, but removed them right away with pamac.

I installed vim and Gvim with pamac on the console.

I tried removing Gvim and vim from the console, but after removing Gvim, vim was also gone. ??

After reinstalling Gvim, the problem persits.

Where do I look to find how this was caused?

Thanks in advance.

Hi.

First you can check if the Esc key is malfunctioning in general. Does it work with other keyboard shortcuts and in other applications?

Secondly, check your ~/.vimrc file to see if something is off there.

Other key combinations to exit the Insert mode are Ctrl+[ and Ctrl+c. You can use one of them until you figure out why Esc isn’t working.

gVim provides also vim for use in the terminal, uninstalling gVim will also uninstall vim.

2 Likes

I was using the onboard keyboard of my Lenovo ideapad 300 when the problem occurred. I switched to a wireless device and the problem persisted. I booted into Fedora and both keyboards worked fine, with Gvim and vi. I also booted into Mint and again no problems.

My home folder does not have a .vimrc file, and the /etc/vimrc did not shout error to me.

The key combos you suggested will have to stand in for the nonce, thank you kindly for the pointer.

1 Like

To me it indicates some keyboard malfunction or a configuration change.

On my system all the mentioned apps works as expected.

1 Like

Since both keyboards work as expected when I run other distros, I have to think it is a configuration issue.

I have been using Plasma for quite a while, since Debian Stretch, so I hope I know how to create shortcuts for my apps. Can’t see me doing something odd in that area.

Don’t have a ~/.vimrc,
/etcdefault/keyboard looks normal,
and the /etc/vimrc only has one line in it. => runtime! archlinux.vim

The copy of Manjaro on this computer, a MS Surface Pro 3 runs gvim and vi in a normal manner. Go figure.

I don’t have to. I don’t have the problem.

You pointed out that is was not consistent - starts out fine - then it changes behaviour …

So one is left to speculate … :man_shrugging: