跳到主要內容

發表文章

目前顯示的是 11月, 2008的文章

Vim 的 path環境變數

path這個環境變數是用來幫助find和gf指令用的 也就是用來搜尋檔案名稱 For example: path=.,~/work/** . 代表目前目錄 目錄後面加上1個*代表那個目錄下 2個*代表那個目錄下的所有目錄 :find hello_world.c 或在程式碼中的檔案名稱上輸入gf

indent

The `indent' program can be used to make code easier to read. It can also convert from one style of writing C to another. indent -kr -ts4 filename

自定vim縮寫

每次要打printf( ... 很累, 可以利用vim 簡寫輸入的功能 :ab 縮寫 全部的字串 For example: :ab pr printf("%s %n\n", __func__, __LINE__); 然後在insert mode輸入pr 就會自動換成後面的字串了

在linux上找不到uncompress指令

yum install -y ncompress