On 5/17/06, Jared <[EMAIL PROTECTED]> wrote:
Ok, this will be my last question for the night (promise!). I'd like to map
separate commands to Ctrl-C and Ctrl-Shift-C. I've tried a couple different
ways to do it, but this one seems like it should be most "correct":
vnoremap <C-c> "+y
vnoremap <C-S-c> ^Gol"+y
Sorry, but I don't think there is a shift-control-c. This is [partly]
because control chars are treated as a single byte, whereas other
keyboard keys, like arrows, etc, are treated as 3-6 byte strings where
the extra modifiers like shit/control/meta are in another byte.
What's happening, though, is that the C-S-c map overwrites the C-c map. If
I were to place C-c below C-S-c in .vimrc, the it'd be the other way around.
So, two questions: 1) Am I defining the <C-S-c> mapping correctly? I
believe that's how it's done, but I couldn't find a specific example in the
docs. 2) How do I make Vim distinguish between the two commands?
Actually, I also have a 3rd, pseudo-related question: How do I include a
control key sequence in a map? I'm using ^G in the above example, but that
seems to be completely ignored when I hit <C-S-c>. I also tried <C-g>, but
that's also ignored.
<c-g> is the correct method. Something else must be happening.
Thanks once again. Believe me when I say that I'm most appreciative of the
help that's constantly offered on this mailing list.
--
Jared