I added the following to my .vimrc file:
nnoremap <silent> <F5>!python %
That should run the current file in Python when I press F5. Instead, it gives the following error:
Trackback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 349, in f_with_update
File "<string>", line 358, in run_this file
NameError: global name 'send' is not defined
Press Enter or type command to continue
If I re-mapped F5 manually everytime I run VIM, this command works:
:map <silent> <F5>!python %
I don’t recall mapping anything to F5, and my .vimrc file doesn’t contain any mapper.
Any idea what’s happening?
<F5>is probably mapped elsewhere. Try:verbose nmap <F5>to see where.