国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux用Vim+Taglist+Ctags閱讀編輯代碼

2024-08-27 23:58:07
字體:
來源:轉載
供稿:網友

其實這套組合很實用了,基本上到了不用鼠標的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"

結果為:

  1. " Line continuation used herelet s:cpo_save = &cposet cpo&vimlet 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 thisfunction 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_savefinishendif 

此時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返回源文件.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 吉林市| 丹江口市| 沁水县| 格尔木市| 宜春市| 子洲县| 松原市| 东阳市| 宝应县| 湖口县| 南昌县| 肇州县| 应用必备| 稷山县| 吴堡县| 河津市| 沂水县| 娱乐| 正定县| 苍溪县| 杭州市| 新沂市| 织金县| 潮州市| 天全县| 伊金霍洛旗| 平远县| 浪卡子县| 崇礼县| 河津市| 巧家县| 泸定县| 旬阳县| 利辛县| 延长县| 封丘县| 桃江县| 合阳县| 江山市| 嘉定区| 汤阴县|