Develop C with vim
OS:Ubuntu12.04Vim version:7.3
Abstract:
fast compile c program with vim by set makeprg; fast run C program by map!.
Basics:
type vimtutor in shell to get the basic command in vim
:help makeprg
:help map
Key:
set makeprg to fast compile C, append the following lines in ~/.vimrc
"compile with make, -lm when necessary "set makeprg=gcc\ -ansi\ -Wall\ -o\ %\ $*
" run c program with run "map! run !./%<
页:
[1]