Skip to content

Instantly share code, notes, and snippets.

@namutaka
Created November 16, 2010 01:38
Show Gist options
  • Save namutaka/701292 to your computer and use it in GitHub Desktop.
Save namutaka/701292 to your computer and use it in GitHub Desktop.
let cmd = "!ls"
function! s:RunCmd()
let tmpfile=tempname()
silent exe cmd . " < " . expand("%") . " > " . tmpfile . " 2>&1"
execute ":sn " . tmpfile
endf
com! Run call s:RunCmd()
map <C-.> :call s:RunCmd()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment