Skip to content

jeetsukumaran/vim-gazetteer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 file. Gazetteer avoids this by implementing dynamic, on-demand buffer-specific tag generation.

Installation

$ cd ~/.vim/bundle
$ git clone git://github.com/jeetsukumaran/vim-gazetteer.git
: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.

About

Semantic location information for Vim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published