Skip to content

Instantly share code, notes, and snippets.

@powdahound
Created July 23, 2009 16:55
Show Gist options
  • Save powdahound/153219 to your computer and use it in GitHub Desktop.
Save powdahound/153219 to your computer and use it in GitHub Desktop.
function! RunShebang()
if (match(getline(1), '^\#!') == 0)
:!./%
else
echo "No shebang in this file."
endif
endfunction
map <F5> :call RunShebang()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment