一江春水向東流

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

            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 應用開發
          主站蜘蛛池模板: 高清| 晋江市| 东辽县| 革吉县| 栾城县| 景洪市| 宜黄县| 连平县| 祥云县| 钦州市| 文成县| 青神县| 济宁市| 荣昌县| 金溪县| 漠河县| 扎赉特旗| 鄂托克旗| 泾川县| 扶沟县| 浑源县| 牟定县| 应城市| 津南区| 峨眉山市| 普兰店市| 化德县| 荔浦县| 河曲县| 石首市| 吴旗县| 闻喜县| 桐乡市| 新余市| 仙桃市| 东兴市| 桐柏县| 玉林市| 吴川市| 十堰市| 泰州市|