I see <CR> as the {lhs} in the listings produced by both ":map" (for
Normal mode etc.) and ":map!" (for Insert mode etc.)
IMHO what you're doing wrong is not realizing that for Vim (and for
ASCII where Vim takes it from),
- Ctrl-M is the carriage-return character
- So is <Enter>
- Ctrl-letter ignores case (i.e., Ctrl-M and Ctrl-m are the same, and so
are Ctrl-A and Ctrl-a, Ctrl-B and Ctrl-b, etc., until Ctrl-Z and Ctrl-z).
If you want to assign a mapping to a single key (not a key sequence), I
recommend an F key (with the exception of F1 which is Help, and of F10
which on some systems is Menu), with or without Shift (and even Shift-F1
and Shift-F10 are possible). In my experience these are the keys which
are neither yet used by Vim for its own purposes, nor hidden from the
program by most OSes Vim runs on (e.g. on the system where I'm now,
Ctrl-Fn and Alt-Fn are used by the window manager, so they never reach
the application -- any application).
Best regards,
Tony.
--
Honesty pays, but it doesn't seem to pay enough to suit some people.
-- F. M. Hubbard
With me it did, but ":map" (with no exclamation mark) doesn't show it
because it doesn't show any imaps. With ":map!" I saw it, when editing
the buffer in question of course, since map-<buffer> for non-current
buffers are never listed.
See ":help map-overview" and scroll down as necessary.
Best regards,
Tony.
--
FATHER: One day, lad, all this will be yours ...
PRINCE: What - the curtains?
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD