let $ERRFILE="/tmp/f8fe1f28-6e6e-11e0-b22e-000c760ae4c6.err" let $CFLAGS="-Wall -O2 -pipe" let $LDFLAGS="" set bs=2 set ls=2 set ts=4 set sw=4 set cindent set hls set ru set nocp syntax on set background=light highlight Comment ctermfg=darkcyan highlight Search term=reverse ctermbg=4 ctermfg=7 function! SingleCompile() let file_suffix = expand("%:e") if file_suffix == "c" !gcc ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${ERRFILE} cg ${ERRFILE} elseif file_suffix == "cpp" !g++ ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${ERRFILE} cg ${ERRFILE} else echo "This file has an UNKNOWN SUFFIX!" endif endfunction map :echo "CFLAGS="$CFLAGS"\n":let $CFLAGS="-Wall -O2 -pipe map :cl map :cp map :cn map :tabp map :tabn map :set background=light:highlight Comment ctermfg=darkcyan map :set background=dark:highlight PreProc ctermfg=darkcyan map :call SingleCompile() map :make map :echo "LDFLAGS="$LDFLAGS"\n":let $LDFLAGS=" map :!less -R %:p:. imap imap a imap a imap a imap a imap a imap a imap a imap imap imap imap