六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 35|回复: 0

Develop C with vim

[复制链接]

升级  16.33%

73

主题

73

主题

73

主题

举人

Rank: 3Rank: 3

积分
249
 楼主| 发表于 2013-1-26 12:29:34 | 显示全部楼层 |阅读模式
OS:Ubuntu12.04
Vim 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 !./%< 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表