作者doomleika (advanced_camper)
看板C_and_CPP
标题Re: [问题] 请问在linux上写C,有哪些方便的IDE
时间Sun Oct 9 14:07:36 2005
※ 引述《whitelittle (小白)》之铭言:
: 小弟刚开始在linux上写C
: editor用vim,compiler用C compiler(cc)
: 每次的动作就是
: 1.%vi xx.c
: .
: .(修改程式码)
: .
: 2.ZZ(跳出vi)
: 3.%./a.out
: .
: .(执行程式)
: .
: (若有bug 再重vi开始)
: 请问在linux下有方便一点的工具吗 毕竟我至少还要写到这个学期结束呢><" 感谢
vim有专为programming用的command set
(usr_21.txt go away and come back)
:!<摆shell指令>
或是:!直接进shell再打exit回来
<edit)
:!gcc %
:!a.out
要储存目前的环境: :mksession
回来後::so session.vim
更多的指令请见:h quickfix.txt :h usr_29.txt :h usr_30.txt
你会写makefile的话看看:h :make
Recovering from a crach :h usr_11.txt
Finding the file to edit :h usr_h22.txt
还有其它的资料你能去:h挖宝
唯一的缺点:不能当debugger(虽然有vim script能干这种事)
要不然就用emacs吧,Coding Compile Debug一次完成(还能拿来煮咖啡)
1F:推 sonyu:可以用 :w | !gcc % && ./a.out 一次解决~ 10/09 14:20
※ 编辑: doomleika 来自: 203.222.6.208 (10/09 14:25)
2F:推 ledia:要不然就 ctrl-z suspend, 执行完再 fg 回来罗... 10/10 04:38