Vim: execute current file?
After you've executed that once, a short :!!
will repeat it.
If you haven't set permissions you can run:
:! sh %
None of the previous answers work if your filename/directory path has spaces in it. Simple fix.
:!"%:p"
:!%:p
,without the spaces, is shorter.
If you want an even shorter shortcut, you can create a custom mapping:
nnoremap <F9> :!%:p
or the more "mnemonic":
nnoremap <leader>r :!%:p