question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using mouse in insert mode causes VIM to think it is in normal mode

See original GitHub issue

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

What happened: When in insert mode using the mouse to move the cursor causes the cursor to switch to block and the mode “changes” to normal; however, VIM is actually in insert and as soon as any letter is pressed the mode “switches” to insert and the character(s) are inserted. If the user settings file is open the cursor behaves as expected.

What did you expect to happen: Stay in insert mode, cursor remains a line and moves to clicked location. This happens if the user settings file is open.

How to reproduce it (as minimally and precisely as possible): be in insert mode click anywhere else in the document.

This has also been reported by christiangenco here (Includes a video).

Environment:

  • Extension Name: vim
  • Extension Version: 0.11.0
  • OS Version: Windows_NT x64 10.0.16299
  • VSCode version: 1.20.1
{
	"activationTimes": {
		"startup": true,
		"codeLoadingTime": 283,
		"activateCallTime": 2,
		"activateResolvedTime": 19,
		"activationEvent": "*"
	}
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
christiangencocommented, Mar 10, 2018

@ivanvoznyakovsky’s bug is happening to me too (and was happening before 0.11.2).

Here’s another video of it happening. Again, strangely, it’s fixed if I open the settings window.

The only key I hit in the video is “a”. When the editor says it’s in “NORMAL” mode and shows a block cursor, it isn’t actually in normal mode, because hitting “a” inserts an “a” character in the second to last position in the line instead of appending.

Here are the plugins and versions I have installed:

screen shot 2018-03-10 at 5 30 19 pm

I’ve gone back to Atom because of this bug, but I’ll hold out and switch back if it gets fixed 😕

0reactions
berknamcommented, Dec 3, 2020

@dmolokanov What you are mentioning is a different issue #5716, it is better fixed with SelectMode that is not implemented yet but is being worked on.

As for the original problem of this issue, I can’t reproduce it and I don’t think it is a problem anymore. So I’m closing this one. But if anyone is still experiencing this issue feel free to comment and we will reopen if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change the cursor between Normal and Insert modes ...
Actually I'm using iTerm2 and using Vim inside my terminal on macOS. ... I find it useful to only have the cursor blinking...
Read more >
Vim normal and insert mode cursor not changing in GNU screen
I think I figured it out, although I don't totally understand the fix. This appears to work for mintty, xterm, and rxvt: "...
Read more >
Vim Editor Modes Explained - freeCodeCamp
Once in insert mode, typing inserts characters just like a regular text editor. You can enter it by using an insert command from...
Read more >
The Only Vim Insert-Mode Cheatsheet You Ever Needed
Insert mode is an important mode in vim. I've put together a cheatsheet with 8 tips and tricks to use insert mode more...
Read more >
moving in insert mode : r/vim - Reddit
i did this so i can move with vim keys (hjkl) in insert mode. ... efficient (or use less key) by going to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found