Currently when I click somewhere in the terminal with mouse=a enabled, Vim exits visual mode. How can I force Vim to remain in Visual mode, and thereby use mouse clicks (not drags) to create a selection from the line/location where visual mode was entered?Edit: I came up with a macro that solves this! I want mouse clicks to behave just like normal-mode movements (so where to restart the selection depends on whether cursor is at beginning or end of selection). If anyone has cleanup recommendations let me know, I'm still a beginner. One issue is that I'm not sure how to make this work for each of lowercase-v mode and uppercase-V mode.Solution:xnoremap <LeftMouse> mA<Esc><LeftMouse>mB :execute normal! `.SelectStart('<','A').v`B<CR>function! SelectStart(mbegin,mcursor)  execute 'normal! `'.a:mbegin  let linb=line('.')  let colb=col('.')  execute 'normal! `'.a:mcursor  let linc=line('.')  let colc=col('.')  if linc>linb || (linc==linb && colc>colb)    return '<'  else    return '>'  endifendfunction
How to keep Vim from exiting Visual Mode due to mouse clicks while mouse=a?
vimrc;visual mode;visual block;mouse
You could do this::xnoremap <LeftMouse> m`<LeftMouse>v``This allows you to click on where you want to extend the visual selection to, rather than drag. It works best if you also :set slm=