vimtricks.wiki Concise Vim tricks, one at a time.

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.

Next

How do I visually select a double-quoted string including the quotes themselves?