close

ctags是個寫程式很方便的輔助工具,它會幫使用者把目錄下的所有程式碼裡的變數、函數等定義做好索引,將來要查某個變數或函數在哪裡被定義,只要選取該字串,在jedit下是執行follow tag,在ultraedit下是find symbol,就可以立刻找到該字的定義。
下面有建立tag索引檔的方法。

原文說明:

Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).

Tag generation is supported for the following languages:

Assembler, AWK, ASP, BETA, Bourne/Korn/Zsh Shell, C, C++, COBOL, Eiffel, Fortran, Java, Lisp, Lua, Make, Pascal, Perl, PHP, Python, REXX, Ruby, S-Lang, Scheme, Tcl, Vim, and YACC. <-支援的程式語言

How to use ctags 5.5.4
E:\software\edit\java\jedit_plugin\ctags554>ctags -R -N --c-types=+cdefglmnpstuvx --exclude=Makefile
E:\project\5107\5107M1_Singappl_CAB5107 (code's path)

Offical Website : Exuberant Ctags

做出來的tag檔,目前知道可用的軟體有 JEdit 和 UltraEdit ,其它應該還有很多。

Jedit要裝Tags這個plugin才能使用ctag,有了ctag後,code browser的功能也才可以使用。

ultraedit記得是在"專案/CTags/預設的標籤檔案"下選擇用Ctag產生出來的tag檔,使用時選擇要找的字,選"搜尋/尋找符號",它就會幫你列出來,介面沒jedit好看方便就是了。

 

管理專案好工具 - Managing Projects with GNU make

 

Linux除錯好工具 - Gdb: Pocket Reference


arrow
arrow
    全站熱搜

    lver76 發表在 痞客邦 留言(0) 人氣()