Ⅰ. 插件描述
Vim async tags generation with project management.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'alvan/vim-indexer-without-it'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'alvan/vim-indexer-without-it'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'alvan/vim-indexer-without-it'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/alvan/vim-indexer
Ⅳ. 文档说明
# Indexer
Vim Indexer plugin that provides async tags generation with project management.
Usage: :Indexer [module] [action] [params ...]
Install this plugin and everything will be DONE!
Use CTRL-] to jump anywhere.
Options
" Project root folders, used to identify ancestor path of project root directory.
let g:indexer_root_folders = [$HOME]
" Project root markers, used to identify project root directory.
let g:indexer_root_markers = ['.git']
" JSON formatted configuration file which located in the project root directory,
" makes you could specify different options for each project.
let g:indexer_root_setting = 'indexer.json'
" Enabled user modules.
let g:indexer_user_modules = ['log', 'tag']
Modules
log
Module that provides logging, usually used for debugging modules themselves.
Usage: :Indexer log
tag
Module that provides painless transparent tags generation (Vim8 with +job feature required).
Usage: :Indexer tag [locate|reload|status|update]
Options (module)
" Module: log
"
let g:indexer_logs_maxsize = 100
" Module: tag
"
" This module can also read the configuration of the current project.
" For example you can have a JSON formatted file in the project directory:
"
" > indexer.json:
" {
" "tags_watches": ["*.php"],
" "tags_command": "ctags",
" "tags_options": "-R --sort=yes --languages=php",
" "tags_savedir": "~/.vim_indexer_tags/",
" "tags_handler_locate": ["locate"],
" "tags_handler_reload": ["reload", "-1"],
" "tags_handler_update": ["update"],
" }
"
" And/Or settings in global:
"
let g:indexer_tags_watches = ["*.c", "*.h", "*.c++", "*.cpp", "*.php", "*.py"]
let g:indexer_tags_command = "ctags"
let g:indexer_tags_options = "-R --sort=yes --c++-kinds=+p+l --fields=+iaS --extra=+q --languages=c,c++,php,python"
let g:indexer_tags_savedir = "~/.vim_indexer_tags/"
let g:indexer_tags_handler_locate = ["locate"]
let g:indexer_tags_handler_reload = ["reload", "-1"]
let g:indexer_tags_handler_update = ["update"]