I have this in my .vimrc
set formatprg=astyle
I can press gggqG to format the whole file just fine,.
Now I’d like to map a hotkey to do this, eg <F10>, but gggqG is not a command I type in Vim command line, so I don’t know how to map this to a key. Thanks for the help.
You can use map: