一江春水向東流

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

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

          其實(shí)這套組合很實(shí)用了 基本上到了不用鼠標(biāo)的source insight境界了,最重要的是可以在text模式下運(yùn)行

          使用的平臺是Fedora 8

          Vim和Ctags在F8安裝完后系統(tǒng)已經(jīng)具備

          Taglist需要自己下載

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

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

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

          let Tlist_Ctags_Cmd="/usr/bin/ctags"

          結(jié)果為:

          " 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

          此時(shí)Ctags和Taglist已經(jīng)結(jié)合起來。

          3.在相應(yīng)的源碼目錄運(yùn)行ctags -R產(chǎn)生相應(yīng)的tags文件

          4.將tags文件在vim運(yùn)行時(shí)導(dǎo)入。可以修改~/.vimrc,以后每次啟動vim將自動導(dǎo)入此tags文件

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

          并設(shè)置語法高亮

          syntax enable

          syntax on

          5.運(yùn)行vim, 激活Taglist時(shí)用:TaglistToggle命令。在左邊的tags區(qū)域和正常編輯區(qū)域切換時(shí)用ctrl+2個(gè)w。

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

          posted on 2008-04-05 23:22 allic 閱讀(324) 評論(0)  編輯  收藏 所屬分類: linux/UNIX 應(yīng)用開發(fā)
          主站蜘蛛池模板: 龙井市| 德化县| 郸城县| 商洛市| 静安区| 枞阳县| 屏南县| 新安县| 芜湖市| 神池县| 灵寿县| 定日县| 盐亭县| 鹤壁市| 隆林| 运城市| 保德县| 开平市| 巴彦淖尔市| 土默特右旗| 商洛市| 望都县| 武夷山市| 永川市| 天全县| 墨竹工卡县| 澄城县| 门源| 清河县| 卢湾区| 宁陵县| 湘阴县| 当阳市| 长垣县| 天门市| 黑龙江省| 东宁县| 米林县| 天峨县| 凤阳县| 通辽市|