How to disable visual mode on mouse select for vim

Miguel David
Sep 7, 2018 · 1 min read

At some point, the maintainers of vim (an enhanced version of vi, a basic editor in most *nix based machines) decided that it would be a good idea to have a visual mode which changes the interaction with vim when there is a mouse selection. This made copy+pasting horrible, but the solution is super simple.

  1. Create the file ~/.vimrc
  2. Insert in it set mouse-=a

In one line:

echo "set mouse-=a" >> ~/.vimrc

Thanks to this gist for the solution!


Originally published at tech.migueldavid.eu on September 7, 2018.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade