-
Star
(241)
You must be signed in to star a gist -
Fork
(27)
You must be signed in to fork a gist
-
-
Save u0d7i/01f78999feff1e2a8361 to your computer and use it in GitHub Desktop.
| Disable vim automatic visual mode on mouse select | |
| issue: :set mouse-=a | |
| add to ~/.vimrc: set mouse-=a | |
| my ~/.vimrc for preserving global defaults and only changing one option: | |
| source $VIMRUNTIME/defaults.vim | |
| set mouse-=a |
This way ends with text copied to clipboard with line numbers, Of course if you have one window vertically. Instead I used to this option. JUST HOLD
SHIFT KEYDURING SELECTING TERMINAL TEXT TO BEHAVE LIKEset mouse-=a
Thanks, it's working :)
For anyone trying to figure it out on Debian 12 after moving from CentOS, here is what you can do by combining all above information and checking what /etc/vim/vimrc is doing:
- create /etc/vim/vimrc.local with following content:
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
let skip_defaults_vim=1
set mouse&
In this way, visual mode on mouse select will be disabled but default configuration still loaded and this config will survive vim upgrade.
still a life safer in year 2025.
Thank you.
Happen in wsl debian too.
If only this worked for IdeaVim. What a pain.
@ixtk
it works like this:
set selectmode=mouse,ideaSelection,
See more info here : https://github.com/JetBrains/ideavim/blob/master/doc/set-commands.md
Thank you. The trick is to disable the mouse support for Vim. I achieved this by adding the following to the
/etc/vim/vimrcfile.I had to add
syntax onto enable syntax highlighting.