How do you map function keys to custom commands?
Answer
nnoremap <F5> :!python %<CR>
Explanation
Map function keys with their <Fn> notation. <F5> runs the current Python file. Function keys work in all modes with appropriate map commands.
nnoremap <F5> :!python %<CR>
Map function keys with their <Fn> notation. <F5> runs the current Python file. Function keys work in all modes with appropriate map commands.