vim-alt-ctags


Ⅰ. 插件描述

Alternative ctags plugin for vim

Ⅱ. 基本信息

创建日期:  2013-03-06
使用用户:  3
Github星:  3
插件作者:  patrick brisbin

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Alt Ctags

An alternative ctags plugin for vim. Automatically runs ctags
asynchronously upon opening any git-controlled file.

Installation

  1. Use [Vundle][]
  2. Add Plugin "pbrisbin/vim-alt-ctags"

Options

SettingDefault valueNotes
g:alt_ctags_loadedunsetSetting this value prevents alt-ctags from loading at all
g:ctags_commandctags -f '%f' -R%f represents the output file
g:ctags_filetags
g:ctags_excludes['~']Ctags will not be run in these directories
b:ctags_commandunsetBuffer-specific override

Notes

The %f in the ctags commands is required because we actually generate
to a temporary file then move it into place. This prevents intermittent
errors if vim attempts to access the file while it's being generated.

Examples

ftplugin/ruby.vim

if isdirectory('app')
  " probably rails
  let b:ctags_command = "ctags -f '%f' -R --exclude='*.js' --langmap='ruby:+.rake.builder.rjs' --languages=-javascript app lib vendor"
else
  " typical ruby project
  let b:ctags_command = "ctags -f '%f' -R lib"
endif

ftplugin/haskell.vim

let b:ctags_command = 'echo ":ctags %f" | ghci -v0 main.hs'

添加新评论