vim-eslint


Ⅰ. 插件描述

A Vim plugin for ESLint.

Ⅱ. 基本信息

创建日期:  2017-08-12
使用用户:  11
Github星:  10
插件作者:  David Graham

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-eslint

A Vim plugin for [ESLint][].

This adds a compiler plugin for JavaScript files, which runs the eslint binary
located in your project's node_modules directory.

Run eslint on all files with :make . or just the current file with :make %.
Errors will appear in the quickfix window and shown with :cwindow.

Installation

git clone https://github.com/dgraham/vim-eslint.git ~/.vim/pack/plugins/start/vim-eslint

Optionally add the following key mappings to your ~/.vimrc file.

" lint current file
noremap <leader>l  :make % <cr>:cwindow<cr>:redraw!<cr>

" lint and fix current file
noremap <leader>lf :make --fix % <cr>:cwindow<cr>:redraw!<cr>

License

Distributed under the MIT license. See LICENSE for details.

添加新评论