vim-fixmyjs


Ⅰ. 插件描述

vim fixmyjs - auto fix your javascript using fixmyjs/eslint/tslint/jscs

Ⅱ. 基本信息

创建日期:  2014-09-26
使用用户:  24
Github星:  69
插件作者:  Yulong Ruan

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-fixmyjs

auto fix your javascript using eslint or fixmyjs or jscs or tslint

screenshot

How to install

Vundle

Bundle 'ruanyl/vim-fixmyjs'

vim-plug

Plug 'ruanyl/vim-fixmyjs'

How to use

  1. Install fixmyjs or eslint (or tslint) globally, or have it in project node_modules folder
  2. Config which autofix engine to use:

    let g:fixmyjs_engine = 'eslint' (default)
    or
    let g:fixmyjs_engine = 'fixmyjs'
    or
    let g:fixmyjs_engine = 'jscs'
    or
    let g:fixmyjs_engine = 'tslint'
  3. For convenience it is recommended that you assign a key for this, like so:
noremap <Leader><Leader>f :Fixmyjs<CR>
  1. For fixmyjs to enable legacy mode:

    let g:fixmyjs_legacy_jshint = 1

添加新评论