Ⅰ. 插件描述
Vim plugin for XOⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sindresorhus/vim-xo'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sindresorhus/vim-xo'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sindresorhus/vim-xo'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sindresorhus/vim-xo
Ⅳ. 文档说明
# vim-xo
Install
Using Pathogen
$ git clone --depth=1 https://github.com/xojs/vim-xo ~/.vim/bundle/vim-xoUsing Vundle
- Add
Plugin 'xojs/vim-xo'to~/.vimrc :PluginInstallor$ vim +PluginInstall +qall
Using NeoBundle
- Add
NeoBundle 'xojs/vim-xo'to~/.vimrc - Re-open vim or execute
:source ~/.vimrc
Using vim-plug
- Add
Plug 'xojs/vim-xo'to~/.vimrc :PlugInstallor$ vim +PlugInstall +qall
Features
Linting with Syntastic
This plugin automatically registers XO as a syntax checker with Syntastic.
To activate XO, put the following in your .vimrc file:
let g:syntastic_javascript_checkers = ['xo']See the Syntastic docs for more.
Formatting with vim-autoformat
Formatting with vim-autoformat will just work when XO is installed globally (npm i -g xo).
License
MIT © Sindre Sorhus