My vim setup( https://github.com/aaronjorbin/.vim ) contains set pastetoggle=<F2>
yet fn+F2 (when vim is running in terminal) causes vim to enter insert mode and output a Q
on it's own line (same behavior when I am already in insert mode). This is the same if I am working on my local machine or if I have sshed into another server.
In iterm2, nothing happens when I am in normal or visual mode. When I am in insert mode, <F2>
is inserted.
My config works perfectly well on my mac mini and linux netbook, but this is throwing me for a loop.
You have
set noesckeys
in your vimrc.I've read a long time ago (no source, sorry) something about function keys being interpreted as
<Esc>number
in some terminals (<Esc>9
for<F9>
).If I'm correct and if I read
:help noesckeys
correctly,set noesckeys
is blocking all function keys. Try commenting it out.