let $ERRFILE="/tmp/fc0edaa9-1383-11e1-8659-000c760ae4c6.err" let $CFLAGS="-Wall -pipe -g" 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 ${HOME}${ERRFILE} cg ${HOME}${ERRFILE} elseif file_suffix == "cpp" !g++ ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${HOME}${ERRFILE} cg ${HOME}${ERRFILE} else echo "This file has an UNKNOWN SUFFIX!" endif endfunction map :set foldmethod=syntax 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 :echo "CFLAGS="$CFLAGS"\n":let $CFLAGS="-Wall -g -pipe 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