vim-vue-syntastic


Ⅰ. 插件描述

Support for vue components linting with syntastic and eslint

Ⅱ. 基本信息

创建日期:  2016-02-23
使用用户:  21
Github星:  11
插件作者:  Sebastian Kellgren

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-vue-syntastic

1. What?

Support for vue components linting with syntastic and eslint

2. Dependencies

2.1. Installing vim-vue-syntastic with Pathogen

If you already have Pathogen working then skip Step 1 and go to
Step 2.

2.1.1. Step 1: Install pathogen.vim

First I'll show you how to install Tim Pope's Pathogen so that it's easy to
install syntastic. Do this in your terminal so that you get the pathogen.vim
file and the directories it needs:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Next you need to add this to your ~/.vimrc:

execute pathogen#infect()

2.1.3. Step 2: Install vim-vue-syntastic as a Pathogen bundle and friends

You now have pathogen installed and can put syntastic into ~/.vim/bundle like
this:

cd ~/.vim/bundle && \
git clone https://github.com/sekel/vim-vue-syntastic.git

... and the same song and dance for the dependencies

2.1.3. Step 3: Optional configuration to make it work with local project eslint

Stick this in your ~/.vimrc:

let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_vue_checkers = ['eslint']
let local_eslint = finddir('node_modules', '.;') . '/.bin/eslint'
if matchstr(local_eslint, "^\/\\w") == ''
    let local_eslint = getcwd() . "/" . local_eslint
endif
if executable(local_eslint)
    let g:syntastic_javascript_eslint_exec = local_eslint
    let g:syntastic_vue_eslint_exec = local_eslint
endif

添加新评论