一江春水向東流

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

            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 閱讀(324) 評論(0)  編輯  收藏 所屬分類: linux/UNIX 應用開發
          主站蜘蛛池模板: 新巴尔虎右旗| 镇宁| 山西省| 绥滨县| 通州区| 溧水县| 新野县| 且末县| 杂多县| 城口县| 江油市| 中牟县| 五常市| 桦南县| 正定县| 浦县| 康乐县| 星子县| 云林县| 灵山县| 亳州市| 磴口县| 长葛市| 宝鸡市| 南昌市| 宜章县| 南开区| 永吉县| 青田县| 焦作市| 开阳县| 牟定县| 类乌齐县| 吉林省| 安义县| 额尔古纳市| 旺苍县| 泰州市| 翼城县| 德江县| 长岛县|