Thanks for the help,
Greg
Well, what about
:map <F1> <Esc>
:map! <F1> <Esc>
?
Best regards,
Tony.
--
From the moment I picked your book up until I put it down I was
convulsed with laughter. Some day I intend reading it.
-- Groucho Marx, from "The Book of Insults"
A curse on laptops, the F1 and ESC are often too close together.
In my .vimrc, I've got
:map <f1> <esc>
:imap <f1> <esc>
so when I stab for the ESC key, and accidentally hit F1, it does
what I want.
-tim
Greg
thanks guys,
Greg
":imap" is for Insert mode. If you want Insert mode _and_ Command-line mode,
use ":map!" with bang instead of ":imap". (":map" without bang is for Normal,
Visual/Select and Operator-Pending.)
See ":help map-overview"
Best regards,
Tony.
--
My God, I'm depressed! Here I am, a computer with a mind a thousand
times as powerful as yours, doing nothing but cranking out fortunes and
sending mail about softball games. And I've got this pain right
through my ALU. I've asked for it to be replaced, but nobody ever
listens. I think it would be better for us both if you were to just
log out again.
You need ":map!" (in addition to ":map") if you want F1 to work like Esc in
all modes, ":imap" if you want Insert-mode but not Command-line mode.
See ":help map-overview".
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
229. You spend so much time thinking what to add on this list.
On Jan 11, 2008 11:56 AM, Greg Sieranski <greg.si...@quoininc.com> wrote:
>
> What is the :imap one needed for?
>
You can refer to the tutorial on mapping keys in Vim:
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_%28Part_1%29
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_%28Part_2%29
- Yegappan