There have been many postings on this issue but none have worked for me. I'm running vim 8.2 on linux ubuntu 20.04, which maybe why some of the postings haven't worked. Like many, I'd like to remap F1 to ESC. I first tried this in .vimrc
map <F1> <Esc> imap <F1> <Esc>
But it didn't work. A suggestion on the web suggested that F1 was being mapped to something else, and proposed doing this while in insert mode in vi:
CTRL V then F1. When I did this, the command returned
\[OP. Then I tried putting these lines into .vimrc
map <\[OP> <Esc> imap <\[OP> <Esc>
That didn't help either. I also tried, in desperation, the same command but omitting the
\ and the
\[ but neither worked either.
Can somebody offer another suggestion please? Surely there's some configuration file for vim that sets the F1 -> help binding in the first place that I can tinker with?
Thanks for any advice