Disable Default vi/vim "Visual Mode" When Selecting Text With the Mouse

I installed OpenHABian 1.7.1 back in April on a Raspberry Pi and very quickly noticed that selecting text using the mouse caused vi/vim to go into Visual Mode, making it difficult to copy/paste selected text. I did not see this issue on any of my other Raspberry Pi systems, so I assumed it was part of OpenHAB vi/vim customization. I finally set aside some time yesterday to track down the issue and found disable_vim_auto_visual_on_mouse.txt which suggests this ‘feechur’ was introduced in a Debian release.

I created the following .vimrc file in both the opehabian and root home folder - it loads the defaults and then overrides the (now) default “set mouse=a”.

source $VIMRUNTIME/defaults.vim
set mouse-=a
1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.