Permalink
Browse files

add option g:makegreen_stay_on_file

g:makegreen_stay_on_file (Default value 0) When the value is different
of zero, adds a bang to the make command (make!) so it does not jumps to
the first error after been executed.
  • Loading branch information...
1 parent d3cbbc6 commit 0a4ae2537d58f0942c0723102467f6266727766f @renanivo renanivo committed Jul 23, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 plugin/makegreen.vim
View
@@ -23,11 +23,17 @@ hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=red
function MakeGreen(...) "{{{1
let arg_count = a:0
+ if exists("g:makegreen_stay_on_file") && g:makegreen_stay_on_file
+ let make_command = "make!"
+ else
+ let make_command = "make"
+ endif
+
silent! w " TODO: configuration option?
if arg_count
- silent! exec "make " . a:1
+ silent! exec make_command . " " . a:1
else
- silent! exec "make"
+ silent! exec make_command
endif
redraw!

0 comments on commit 0a4ae25

Please sign in to comment.