coffeetags


Ⅰ. 插件描述

Ctags-like tag generator for CoffeeScript

Ⅱ. 基本信息

创建日期:  2011-09-05
使用用户:  64
Github星:  177
插件作者:  Łukasz Korecki

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# CoffeeTags

Latest version: Gem version

A simple tool for generating CoffeeScript tags (Ctags compatible).

Build Status Coverage Status

Watch a quick demo

Huh?

CoffeeTags was created for use with Vim and TagBar plugin, however it
accepts most common ctags arguments, therefore the following:

coffeetags -R -f TAGS

will generate standard TAGS file which later can be used with Vim (standard :tag command works as expected)

Requirements

  • ruby 1.8.7 and up

Windows support

Yup, we got it!

Editors supported

Halp!

Just use coffeetags --help

Ruby Gem

Installation

gem install CoffeeTags (or sudo gem install CoffeeTags)

Usage

$ coffeetags --help

Vim

This can also be used as a vim plugin that will update tag files on save, and support visualization with TagBar. You will still need to install the gem as described above as well as install the plugin to vim. You can install it via:

Install

  • Pathogen

    • git clone https://github.com/lukaszkorecki/CoffeeTags ~/.vim/bundle/CoffeeTags
  • NeoBundle

    • NeoBundle 'lukaszkorecki/CoffeeTags'
  • Vundle

    • Bundle 'lukaszkorecki/CoffeeTags'
  • manual

    • copy all of the files into your ~/.vim directory

Configuration

In you ~/.vimrc you can configure the plugin with:

let g:CoffeeAutoTagDisabled=<0 or 1>     " Disables autotaging on save (Default: 0 [false])
let g:CoffeeAutoTagFile=<filename>       " Name of the generated tag file (Default: ./tags)
let g:CoffeeAutoTagIncludeVars=<0 or 1>  " Includes variables (Default: 0 [false])
let g:CoffeeAutoTagTagRelative=<0 or 1>  " Sets file names to the relative path from the tag file location to the tag file location (Default: 1 [true])

Sublime Text

See this issue on SublimeText/Ctags

Config types

CoffeeTags can work in 2 modes:

  • tags only for functions (default)
  • tags for functions and objects containing them

Second mode is activated by:

  • Adding --include-vars to command line arguments
  • Setting let g:CoffeeAutoTagIncludeVars=1 in your ~/.vimrc for vim

TODO

  • squash all bugs

License

MIT

Bitdeli Badge

添加新评论