看板 C_and_CPP 關於我們 聯絡資訊
※ 引述《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一次完成(還能拿來煮咖啡)
sonyu:可以用 :w | !gcc % && ./a.out 一次解決~ 10/09 14:20
※ 編輯: doomleika 來自: 203.222.6.208 (10/09 14:25)
ledia:要不然就 ctrl-z suspend, 執行完再 fg 回來囉... 10/10 04:38