0

I am trying to remap a key (I do not matter which) to F5 key because my physical keyboard hasn't got F1 - F12 keys. How can I do it?

I have tried to use nnoremap but I am doing something wrong. I have tried :nnoremap ; <F5>

Edit 1:

I think ; is an invalid key, I am now trying various things with <Space> but I am not able to obtain what I want.

  • You want to remap any key to F5 but you said your keyboard doesn't have F1-F12 – E2Busy Dec 15 '15 at 22:38
  • I mean that I would like that pressing Space it act like pressing F5 – Nisba Dec 15 '15 at 22:41
  • What OS? - Windows, Mac, Linux? – E2Busy Dec 15 '15 at 23:17
  • I al using iOS to connect via SSH to an Ubuntu, where I launch Vim – Nisba Dec 15 '15 at 23:29
  • Possible duplicate of Sending F1 - F12 key with external keyboard with missing keys – Heptite Dec 16 '15 at 2:39
0

From your comments I strongly suspect that F-5 is a mapped key, so you're using nnoremap to try to map a key to another mapped key.

The :nore versions of the various map commands tell Vim explicitly not to trigger a second mapped key sequence to the right-hand-side (rhs) of the mapping.

In other words, the solution is to use :nmap instead of :nnoremap, and it should then work.

See :help :nore

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.