:!%:p
or
:! sh %
Explanation:
-
:enter command mode. -
!execute the following command in the external shell -
%retrieve the entire file -
:puse the full path of the file -
shrun the system shell
See also: https://stackoverflow.com/questions/15449591/vim-execute-current-file