一江春水向東流

          做一個有思想的人,期待與每一位熱愛思考的人交流,您的關注是對我最大的支持。

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            44 隨筆 :: 139 文章 :: 81 評論 :: 0 Trackbacks
          ?

          其實這套組合很實用了 基本上到了不用鼠標的source insight境界了,最重要的是可以在text模式下運行

          使用的平臺是Fedora 8

          Vim和Ctags在F8安裝完后系統已經具備

          Taglist需要自己下載

          1.下載一個Taglist的zip文件,然后解壓縮,將taglist.vim復制到~/.vim/plugin目錄下。

          2.修改~/.vim/plugin/taglist.vim

          在 if !exists('loaded_taglist')上面加入

          let Tlist_Ctags_Cmd="/usr/bin/ctags"

          結果為:

          " Line continuation used here
          let s:cpo_save = &cpo
          set cpo&vim
          
          let Tlist_Ctags_Cmd="/usr/bin/ctags"
          
          if !exists('loaded_taglist')
          " First time loading the taglist plugin
          "
          " To speed up the loading of Vim, the taglist plugin uses autoload
          " mechanism to load the taglist functions.
          " Only define the configuration variables, user commands and some
          " auto-commands and finish sourcing the file
          
          " The taglist plugin requires the built-in Vim system() function. If this
          " function is not available, then don't load the plugin.
          if !exists('*system')
          echomsg 'Taglist: Vim system() built-in function is not available. ' .
          \ 'Plugin is not loaded.'
          let loaded_taglist = 'no'
          let &cpo = s:cpo_save
          finish
          endif

          此時Ctags和Taglist已經結合起來。

          3.在相應的源碼目錄運行ctags -R產生相應的tags文件

          4.將tags文件在vim運行時導入。可以修改~/.vimrc,以后每次啟動vim將自動導入此tags文件

          :set tags=/root/develop/honeyids/tags

          并設置語法高亮

          syntax enable

          syntax on

          5.運行vim, 激活Taglist時用:TaglistToggle命令。在左邊的tags區域和正常編輯區域切換時用ctrl+2個w。

          6.使用ctags時, ctrl+]可查看函數的定義。 ctrl+o返回源文件。

          posted on 2008-04-05 23:22 allic 閱讀(328) 評論(0)  編輯  收藏 所屬分類: linux/UNIX 應用開發
          主站蜘蛛池模板: 离岛区| 禄丰县| 内乡县| 娱乐| 上饶市| 屯昌县| 夏河县| 莱芜市| 岢岚县| 武夷山市| 个旧市| 鹤岗市| 桐庐县| 黑河市| 定州市| 乌什县| 库尔勒市| 南康市| 新绛县| 仲巴县| 大悟县| 涿州市| 福泉市| 苏尼特右旗| 承德市| 犍为县| 崇明县| 施甸县| 德安县| 日喀则市| 崇义县| 昭通市| 金平| 德惠市| 景德镇市| 博罗县| 惠州市| 水城县| 芦山县| 柳州市| 炎陵县|