coffee-check.vim


Ⅰ. 插件描述

Automatic CoffeeScript syntax validation checker for Vim

Ⅱ. 基本信息

创建日期:  2011-12-01
使用用户:  7
Github星:  12
插件作者:  wei ko kao

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'othree/coffee-check-vim-you-belong-with-me'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'othree/coffee-check-vim-you-belong-with-me'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'othree/coffee-check-vim-you-belong-with-me'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/othree/coffee-check.vim

Ⅳ. 文档说明

# coffee-check.vim

Introduction

It is hard to find out where is you script error if you use CoffeeScript plugin for RequireJS. This Vim plugin is design to help reduce the effect of this issue, it will check the code syntax base on CoffeeScript compiler everytime when you save a coffee file automatically.

Requirement

  • node: used to compile coffee script.

Installation

Use pathogen.vim or Vundle is suggestion.

If you didn't install vim-coffee-script
Add the following line to vimrc:

au BufRead,BufNewFile *.coffee set ft=coffee

Usage

To disable error line sign, add this line to your ~/.vimrc file:

let g:coffeeCheckSignErrorLine = 0

To enable error highlighting altogether add this line to your ~/.vimrc file:

let g:coffeeCheckHighlightErrorLine = 1

Important (Known Issues)

  • Only one error appears in every check, if you have several error in your script, you will have to fix one by one.
  • Some error message can't locate to correct line number, all this kind of error will mark to line 1.
  • Cause of previous issue, can't use the behavior of jslint.vim. So Vim will open quickfix window if any error was found.

Acknowledge

Thanks for the base of jslint.vim by Jesse Hallett.

License

Release under MIT License.

添加新评论