ttags


Ⅰ. 插件描述

Tag list browser for VIM (List, filter, preview, jump to tags)

Ⅱ. 基本信息

创建日期:  2007-09-11
使用用户:  7
Github星:  9
插件作者:  Tom Link

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'tomtom/ttags'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'tomtom/ttags'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'tomtom/ttags'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/tomtom/ttags_vim

Ⅳ. 文档说明

:TTags [KIND] [TAGS_RX] [FILE_RX]
In order to match any kind/rx, use *.
E.g. TTags _foo.vim$

Features:

- List tags
- Filter tags matching a pattern
- Jump/Preview tags
- Insert tags (and a template for the argument list if supported by 
  tSkeleton, which has to be installed for this)

Install~

Edit the vba file and type: >

:so %

See :help vimball for details. If you have difficulties or use vim 7.0,
please make sure, you have the current version of vimball (vimscript

1502) installed.

This script requires tlib (vimscript #1863) to be installed.

Suggested maps (to be set in ~/.vimrc): >

" Show available tags
noremap <Leader>g. :TTags<cr>

" Show current buffer's tags
noremap <Leader>g% :call ttags#List(0, "*", "", ".")<cr>

" Show tags matching the word under cursor
noremap <Leader>g# :call ttags#List(0, "*", tlib#rx#Escape(expand("<cword>")))<cr>

" Show tags with a prefix matching the word under cursor
noremap <Leader>g* :call ttags#List(0, "*", tlib#rx#Escape(expand("<cword>")) .".*")<cr>

" Show tags matching the word under cursor (search also in |g:tlib_tags_extra|)
noremap <Leader>g? :call ttags#List(1, "*", tlib#rx#Escape(expand("<cword>")))<cr>

" Show tags of a certain category
for c in split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', '\zs')
    exec 'noremap <Leader>g'. c .' :TTags '. c .'<cr>'
endfor

You can use :echo keys(ttags#Kinds())<cr> to find out which kinds are defined.

Dependencies:
tlib (>= 0.21) :: http://github.com/tomtom/tlib_vim

License: GPLv3 or later
Install: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT
See http://github.com/tomtom for related plugins.

添加新评论