看板 b96902HW 關於我們 聯絡資訊
選一個順手的 editor 在寫程式上是非常非常有幫助的。 就算是非常非常老到的 progammer,我想大概也很少有人用 notepad 寫 XD 好的 programming editor 至少要能夠 syntax 上色、auto indent 等等 這對於避免語法或結構上的錯誤有很大的幫助!比方說 int main(){ int num; scanf("%d", &num); if(num % 2 == 0) if(num % 3 == 0) printf("%d is a multiple of 2 and 3\n", num); else printf("ARE YOU SURE %d IS ODD?\n"); return 0; } 跟 int main(){ int num; scanf("%d", &num); if(num % 2 == 0) if(num % 3 == 0) printf("%d is a multiple of 2 and 3\n", num); else printf("ARE YOU SURE %d IS ODD?\n"); return 0; } 比起來,大家應該會覺得後者 (經過 vim 的上色及 indent) 更容易看懂吧! 除此之外,Vim 和 Emacs 有更多方便 programmer 的功能, 比方說和 compiler/debugger 的結合等。 除了 Vim 和 Emacs 外,Windows 上的 UltraEdit 也是不錯的選擇。 VC++、Dev-C++ 等 IDE 的 editor 也都至少有上述的功能。 IDE 比較方便的地方是 editor / compiler / debug 都在同一個地方完成, 不過一些自由度就比較少了。 -- n;main(i){return n?i<2?i:main(i-1)+main(i-2): scanf("%d",&n)&&printf("%d\n",n>0?main(n):0);} -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.30.54
jimmycool:看慣上過色的code再看沒顏色的好痛苦XD 09/20 21:01
pangfeng:我看到有顏色的code會頭痛. :P 09/20 22:48
chhsiao:老師不用 emacs 上色嗎XD 09/20 22:48