Ⅰ. 插件描述
Generate ctags for my projects whenever i save a fileⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tilljoel/vim-automatic-ctags'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tilljoel/vim-automatic-ctags'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tilljoel/vim-automatic-ctags'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tilljoel/vim-automatic-ctags
Ⅳ. 文档说明
automatic-ctags.vim
Don't use this plugin yet, work in progress
I wrote this plugin to generate ctags files for
all my projects. I use ctags in combination with
FuzzyFinder.vim to move
around, a fast way to "take me to this method".
<C-i> :FufTag <CR>
This plugin generates and updates ctags and keep them in the project
root directories. It locates the project root directory searching for
specific files that indicates a code project. By default its .git andGemfile.
:AutomaticCtagswill regenerate the tagsfile
Map this to a key, trigger it on every save or just run it when you need
to generate tags. Since the plugin traverses the every dir down to you
home directory, its a good idea only running the command when you know
it will hit one of your filenames that indicates a project.
autocmd BufWritePost *.rb :call AutomaticCtags()
map <F1> AutomaticCtags
Installation
If you don't have a preferred installation method, I recommend
installing pathogen.vim with
vim-update-bundles
Add place all your plugins to your .vimrc using
" Bundle: tilljoel/vim-automatic-ctags # https://github.com/tilljoel/vim-automatic-ctags
Configuration
Add these lines to your .vimrc and change them for your needs. The
default values are the ones below so if they are good you can skip these
lines.
let g:automatic_ctags_files=".git,Gemfile"
let g:automatic_ctags_cmd="ctags"
let g:atomatic_ctags_filename="tags"
Add .gitignore settings globally since we create a lot of tags-files now.
git config --global core.excludesfile ~/.gitignore
printf "tags" >> ~/.gitignore
Make sure you set your tags variable also, This will look in the current
directory for "tags", and work up the tree towards root until one is found.
set tags=./tags;/
Contributing
Fork it, fix it. Its my first vim plugin ever.
Follow
Just hit follow [here on
GitHub](https://github.com/tilljoel/vim-automatic-ctags) or find me on: