F1

1 view
Skip to first unread message

Max Waterman

unread,
Dec 18, 2008, 5:59:21 PM12/18/08
to vim...@googlegroups.com
Hi,

My laptop has the F1 key where my fingers expect the Esc key to be, so I
tried to ':map ctr-vf1 ctr-vesc', but it made no difference.

Can someone tell me how to remap the f1 key to escape?

Thanks,

Max.

John Beckett

unread,
Dec 19, 2008, 2:44:42 AM12/19/08
to vim...@googlegroups.com

You need a mapping that's active in insert mode:

:imap <F1> <Esc>

John

Tony Mechelynck

unread,
Dec 19, 2008, 7:30:02 AM12/19/08
to vim...@googlegroups.com

You might want Command-line as well as Insert, and in addition Normal,
Visual and Operator-Pending. For that, use the following two mappings:

map <F1> <Esc>
map! <F1> <Esc>

Best regards,
Tony.
--
We are confronted with insurmountable opportunities.
-- Walt Kelly, "Pogo"

Max Waterman

unread,
Dec 19, 2008, 3:45:52 PM12/19/08
to vim...@googlegroups.com
Tony Mechelynck wrote:
> On 19/12/08 08:44, John Beckett wrote:
>
>> Max Waterman wrote:
>>
>>> My laptop has the F1 key where my fingers expect the Esc key
>>> to be, so I tried to ':map ctr-vf1 ctr-vesc', but it made no
>>> difference.
>>>
>>> Can someone tell me how to remap the f1 key to escape?
>>>
>> You need a mapping that's active in insert mode:
>>
>> :imap<F1> <Esc>
>>
>> John
>>
>
> You might want Command-line as well as Insert, and in addition Normal,
> Visual and Operator-Pending. For that, use the following two mappings:
>
> map <F1> <Esc>
> map! <F1> <Esc>
>
> Best regards,
> Tony.
>
Thank you both.

Max.

Reply all
Reply to author
Forward
0 new messages