Hi guys:
How do I combine CTRL with / to comment and uncomment a line or some selected lines
when coding in java ?
Best regards
Liang Chen
You don't (at least, not with strictly Vim commands). The only
Ctrl-printable-key chords which Vim can reliably detect (because they
are defined in the ASCII standard) are the following:
Ctrl-@ 0x00 NUL
Ctrl-A to Ctrl-Z 0x01 to 0x1A
Ctrl-a to Ctrl-z 0x01 to 0x1A
Ctrl-[ 0x1B ESC
Ctrl-\ 0x1C
Ctrl-] 0x1D
Ctrl-^ 0x1E
Ctrl-_ 0x1F
Ctrl-? 0x7F DEL
Most of these, however, already have a function in Vim (and some are
aliases of other keys: Ctrl-H and Bsp, Ctrl-I and Tab, Ctrl-M and Enter,
Ctrl-[ and Esc, Ctrl-? and Del).
The "safest" keys to use in Vim for the {lhs} of a mapping are the F
keys, with or without Shift: <F2> to <F12> and <S-F1> to <S-F12>. (Some
OSes, including mine, intercept Ctrl-Fn and Alt-Fn, which never reach an
application program such as vim or gvim.)
Best regards,
Tony.
--
Q: Where can you buy black lace crotchless panties for sheep?
A: Fredrick's of Ithaca, New York.