一江春水向東流

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

            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 應用開發
          主站蜘蛛池模板: 徐州市| 达孜县| 视频| 孟津县| 徐州市| 山丹县| 通河县| 金沙县| 聂荣县| 宾阳县| 盐津县| 化州市| 萨迦县| 墨竹工卡县| 吴堡县| 江陵县| 黄梅县| 阳原县| 陵川县| 搜索| 岗巴县| 无棣县| 军事| 应城市| 南宫市| 玉溪市| 晋江市| 贺兰县| 山东省| 类乌齐县| 同江市| 萨迦县| 和龙市| 泸西县| 沧州市| 张家港市| 汶川县| 赤水市| 石棉县| 海晏县| 安新县|