In Vim, how would I set up a macro for Ctrl+Shift+another key? I did noremap and the mapping practically ignored the shift. I could press and the macro would go through.
Asked
Active
Viewed 1,759 times
2
-
What is "another key"? Remember that Shift+4=$, for example :) – Maxim Sloyko Dec 27 '10 at 13:00
-
1BTW, I haven't vote for closing the question, but AFAIK this is exactly the same as this one: http://stackoverflow.com/questions/1703785/how-can-i-create-a-mapping-with-control-and-a-function-key-in-vim – Luc Hermitte Dec 27 '10 at 19:30
1 Answers
2
It's hard to say without seeing the actual commands you're using. What does your noremap command look like, something like this?:
noremap <s-c-F8> :[command here]<CR>

Andrew Sledge
- 10,163
- 2
- 29
- 30

Herbert Sitz
- 21,858
- 9
- 50
- 54
-
This should not make any difference. With gvim, on my XP box, ctrl-v+ctrl-shift-f8 displays
. And yet, when I map – Luc Hermitte Dec 27 '10 at 17:32I have the correct result, and the other way around is true as well. But the best demonstration is the following: mab something to , map something else to , and then ask vim what it has mapped for both. -
@Luc -- Thanks, I had problem some months ago and was left thinking the order mattered. Must have been some other problem I actually had. In any case wanted to get some code out there as example so we get some idea of what OP is actually doing. . . [ revised post to take out suggestion that ordering matters] – Herbert Sitz Dec 27 '10 at 18:07
-
I am trying to use the same hotkey for text pasting in gvim as in the terminal. I don't want to remember two different macro shortcut for the same function. – Hien Dec 27 '10 at 21:02