vim-gazetteer


Ⅰ. 插件描述

Semantic location information for Vim.

Ⅱ. 基本信息

创建日期:  2014-04-16
使用用户:  10
Github星:  11
插件作者:  Jeet Sukumaran

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Gazetteer

Semantic location information for Vim.

Typing 'gG' will echo the (scoped) name of the function, method, class, etc.
of the current cursor position.

If the Ctrl-P fuzzy-finder plugin for
Vim is installed, then typing 'gz' or the command
'CtrlPGazetteer' will invoke fuzzy-finding-and-jumping for tags of the
current buffer.

Mandatory Prerequisites

Exuberant Ctags to be installed and
available on the system path.

Optional Prerequisites

Ctrl-P to enable fuzzy-searching and
navigation of buffer tags.
Gazetteer also provides an extension for the
Ctrl-P fuzzy-finder plugin for
Vim. Ctrl-P ships
with a tag finder built-in, but this requires external management of a tags

  1. Gazetteer avoids this by implementing dynamic, on-demand
    buffer-specific tag generation.

Installation

pathogen.vim

$ cd ~/.vim/bundle
$ git clone git://github.com/jeetsukumaran/vim-gazetteer.git

Vundle

:BundleInstall jeetsukumaran/vim-gazetteer

Add the line below into your _.vimrc_.

Bundle 'jeetsukumaran/vim-gazetteer'

Manually

Copy the autoload and plugin sub-directories to your .vim directory (on
Windows: _vimfiles_).

Activating the Ctrl-P Extension

To enable the Ctrl-P extension, add
gazetteer to the variable g:ctrlp_extensions in your _.vimrc_:

let g:ctrlp_extensions = ['gazetteer']

Key Maps

By default, typing 'gG' will print the name of the current code entity
in the message area. If you want to use another key-mapping to invoke this,
then define it in your '_.vimrc_' by, for example:

nmap <Leader>g <Plug>GazetteerEchoLocation

By default, typing 'gz' will invoke
Ctrl-P to search for and, if selected, go
to, tags in the current buffer. If you want to use another key-mapping to
invoke this, then define it in your '_.vimrc_' by, for example:

nmap <Leader>G <Plug>CtrlPGazetteer

Configuration

If ctags isn't in your $PATH, use this to set its location:

let g:ctrlp_gazetteer_ctags_bin = ''

Use this to set the arguments for ctags, jsctags... for a given filetype:

let g:ctrlp_gazetteer_types = ''

Examples:

let g:ctrlp_gazetteer_types = {
  \ 'cuda'     : '--language-force=c++',
  \ 'javascript' : {
  \   'bin': 'jsctags',
  \   'args': '-f -',
  \   },
  \ }

License

Copyright 2014 Jeet Sukumaran

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

添加新评论