0

I use Vim more and more, and I installed the plugin ideaVim in my IDE from JetBrains (pyCharm, phpStorm).

I still use the mouse a lot to navigate and select text, and sometimes when I click in the file to position the cursor, it selects the character I clicked on and switches to visual mode.

Can I configure Vim to prevent that kind oh behaviour? I would like to prevent any switch to visual mode unless the mouse selection has more than two characters.

Any hints, or other ways to prevent this problem?

1 Answer 1

2

You actually want to stop visual mode when moved cursor using mouse.

I think your plugins might have changed the mouse mode to a.

 :set mouse=a                     //This causes visual mode.

Change it to

 :set mouse=r 

in command line. Or, put this line in your ~/.vimrc. If that doesn't work, then you can put

 :au BufEnter *.* :set mouse=r

in ~/.vimrc.

Now, when you move the mouse, it will not select through visual mode.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .