Preventing using the mouse in vim from sending it into visual mode and breaking copy capability
From my ~/Projects/mlncn/scripts/.vim_custom:
" Allow the mouse to be used within terminal vim.
" There is now officially no need for gvim.
" Thanks to Chris Thompson and http://vim.wikia.com/wiki/Using_the_mouse_for_Vim_in_an_xterm
" To keep copy-paste working use -r not -a https://unix.stackexchange.com/a/140584/171876
" Alternate solution see http://vim.wikia.com/wiki/Make_mouse_drag_not_select_text_or_go_into_visual_mode
:set mouse=r
… currently this still causes line numbers to be copied.
I think i’ll comment this out from my vim_custom:
" Turn line numbers on by default
:set number
And toggle it on with :set number
and off with :set nonumber
as needed.