vim compile and run

Jan 07 2012 Published under Linux,Programming | Tags:

<F5> to compile (using makefile) and execute program.
insert the following into .vimrc:

map <F5> :call CompileRunGcc()
func! CompileRunGcc()
  exec "w" 
  exec "silent make"
  exec "silent !clear"
  exec "silent !echo Prog: %"
  exec "silent !echo -----------------------"
  exec "silent !./%:r"
  exec "!echo -----------------------"
endfunc
Tags:

No responses yet

Comments are closed at this time.

Login