3
Is it possible to bind <C-->
(or <C-dash>
or <C-minus>
, I actually do not know) in vim to something, like <C-W><C-Q>
?
What does it mean <C-->
in the default binding?
3
Is it possible to bind <C-->
(or <C-dash>
or <C-minus>
, I actually do not know) in vim to something, like <C-W><C-Q>
?
What does it mean <C-->
in the default binding?
3
Perhaps you could make that binding work in gvim, but not in vim running in a terminal, because you are unlikely to find a keyboard configuration which sends a different sequence of characters for control/Minus. As a rule, the control modifier affects only a few non-alphabetic characters.
Here is a screenshot from vttest
, which happens to illustrate the usual set of control keys:
1
You can set the command by typing control-v
, then the key combo you want.
So for "control" + "minus", enter the following on a new line in your ~/.vimrc
:
nnoremap *type on your keyboard*<ctrl-v><ctrl-minus>*end type* :MyCommand<cr>
Hopefully this makes sense!
Is
*type on your keyboard*
really part of the command? – G-Man Says 'Reinstate Monica' – 2017-09-17T20:00:54.703No. That's my way of saying "literally enter these keystrokes". My explanation is an attempt to show you a mixture of the actual text that would appear in your
.vimrc
, and what you would type at your keyboard. – JesseBuesking – 2017-09-18T04:45:50.877To whoever down-voted: did you try this and it did not work for you? I ask because earlier today I was looking to setup control+minus myself, and this is what I did to get it working. – JesseBuesking – 2017-09-18T04:48:09.040