Skip to content

Instantly share code, notes, and snippets.

@joecannatti
Created January 26, 2011 00:44
Show Gist options
  • Save joecannatti/796016 to your computer and use it in GitHub Desktop.
Save joecannatti/796016 to your computer and use it in GitHub Desktop.
function! RedGreenForShellCmd(cmd)
exec ":! " . a:cmd
redraw
if v:shell_error
call RedBar()
else
call GreenBar()
endif
endfunction
"from Gary Bernhardt"
function! RedBar()
hi RedBar ctermfg=white ctermbg=red guibg=red
echohl RedBar
echon repeat(" ",&columns - 1)
echohl
endfunction
function! GreenBar()
hi GreenBar ctermfg=white ctermbg=green guibg=green
echohl GreenBar
echon repeat(" ",&columns - 1)
echohl
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment