Can not leave Insert-mode in gvim 8.1 after starting without opening file

Viewed 683

I just installed gvim 8.1 on my Win10-machine and wanted to modify _vimrc, and to learn to use vim.

I can switch modes with a,i, <C-o> to enter insert-mode, and <C-c> or <Esc> to get back to normal mode, but only when I opend a file with gvim.

If I only start gvim, it displays an empty unnamed file in insert mode, and no combination of keys lets me leave the insert mode.

I tried:

  • Ctrl+c
  • Esc
  • ^c
  • ^C
  • activating/deactivating Capslock
  • Ctrl+[ (German QWERTZ-keyboard, [ is on AltGr+8)

I also deleted msvim.vim, because I thought that might help, but it had absolutely no effect.

Any other ideas how to leave insert mode here? Everything is fine if I open a text-file directly...

1 Answers

Try typing <C-o>:verbose set insertmode?<CR>. If it replies with insertmode, you're in easy mode (:help easy). For that session, you can turn this off via <C-o>:set noinsertmode<CR>.

If you're lucky, the :verbose also tells you the file where (mistakenly) :set insertmode happened. But I rather suspect that the shortcut that starts Vim passes the -y command-line argument (but it's only effective if no files are passed). To fix that, you need to check the shortcut (don't use one that says Vim (Easy mode) in it, or launches evim.bat) or your file associations in the Windows registry.

Related