Score:0

How to disable M\mouse wheel click paste in VIM?

cn flag

Using Ubuntu 20.04, when using vim, clicking mouse wheel works same as pushing 'p' in command mode.

I tried

sudo apt-get install -y xbindkeys xsel xdotool &&
echo '"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys"' >> ~/.xbindkeysrc &&
echo 'b:2 + Release' >> ~/.xbindkeysrc &&
xbindkeys -p &&
echo -e "[Desktop Entry]\nType=Application\nName=xbindkeys\nExec=xbindkeys\nComment=Disable middle click paste" >> ~/.config/autostart/xbindkeys.desktop

and disabled push mouse wheel to paste in gnome-tweaks

Second changed nothing, and first disabled mouse wheel click paste in other program. But only vim still pastes something and I hope to disable it

Score:0
cn flag

it is a vim setting. add set mouse="" in your .vimrc file. read more about it via :help mouse.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.