Ⅰ. 插件描述
eslint compiler for vim -- shows lint errors in location listⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bigfish/vim-eslint'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bigfish/vim-eslint'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bigfish/vim-eslint'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bigfish/vim-eslint
Ⅳ. 文档说明
## Vim JSHint
A vim compiler plugin to run eslint.
Installation
- Install eslint globally:
sudo npm install -g eslint
- Install this plugin -- eg. using plugin manager such asVundle or Pathogen
After you open a .js file, and save it, it will run eslint on the file
and report errors in the location window.
It will jump to the location of the first error.
It has 2 options, controlled by global vars:
let g:eslint_onwrite = 1
will cause it to run when file is saved. Default is on/1
let g:eslint_goto_error = 1
will cause it to jump to first error. Default is off/0.
ALso, running the command
:ESLint
will trigger linting of current file.