Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remap control-shift-leftmouse in gvim?

I'd like to remap a modified click in gvim (and also MacVim), but certain combinations of modifiers work while others do not. In gvim on a Linux box, I would like to insert "hello" anywhere I type:

:noremap <C-S-LeftMouse> <LeftMouse>ihello<ESC>

However, that command does not work: control-shift-click retains its original behavior. Yet I can remap control-click in gvim:

:noremap <C-LeftMouse> <LeftMouse>ihello<ESC>

In MacVim, command-shift-click <D-S-LeftMouse> is likewise unresponsive, as are most other modified clicks.

How can I actually remap the modified mouse clicks?

like image 667
Seth Johnson Avatar asked Sep 21 '11 17:09

Seth Johnson


1 Answers

To remap the <C-LeftMouse> in MacVim, you should first disable the contextual menu:

defaults write org.vim.MacVim MMTranslateCtrlClick 0
like image 192
Anderson Freitas Avatar answered Sep 27 '22 00:09

Anderson Freitas