vim-jslint


Ⅰ. 插件描述

Run :make on a JavaScript file, get JSLint messages in the quickfix buffer.

Ⅱ. 基本信息

创建日期:  2012-08-27
使用用户:  2
Github星:  1
插件作者:  Kris Jenkins

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-jslint

Run :make on a JavaScript file, get JSLint messages in the quickfix buffer.

WARNING The different versions of JSLint have wildly different output formats.
This plugin targets NodeJS's version 0.1.9 (npm install jslint -g).

Installation

  • Install Pathogen. (You're already using Pathogen, right?)
  • Clone this project into ~/.vim/bundle/vim-jslint.

Usage

When you're editing a javascript file, type :make to run it against JSLint,
and then :cw to open the quickfix list. For convenience, you might want to add
something like this to a ~/.vim/ftplugin/javascript.vim file:

nnoremap <buffer> <silent> <Leader>m :w<CR>:make<CR>:cw<CR>

So that ,m will save, run and show any errors in one stroke.

Notes

There's so little code here isn't almost not worth its own plugin. But vim's
errorformat is so obtuse that no-one should have to write this again. :-}

添加新评论