tradeship-vim


Ⅰ. 插件描述

Vim plugin to run tradeship, which automatically imports JS dependencies and removes unused ones.

Ⅱ. 基本信息

创建日期:  2017-03-15
使用用户:  3
Github星:  2
插件作者:  Karthik Viswanathan

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Tradeship for Vim
Vim plugin to run tradeship, which
automatically imports missing JS dependencies and removes unused ones.

Installation

Ensure you have tradeship installed:

$ npm install -g tradeship
# or use yarn:
$ yarn global add tradeship

Install tradeship-vim with your favorite package manager. For
vim-plug, add this to your ~/.vimrc:

Plug 'karthikv/tradeship-vim'

And then run :PlugInstall.

Usage

To run tradeship, you may either:

  • Execute :Tradeship
  • To run on save, add the following to your ~/.vimrc:

    autocmd BufWritePre *.js,*.jsx Tradeship
  • To run using a keyboard shortcut (e.g. ctrl + alt +
    i), add the following to your ~/.vimrc:
nnoremap <C-A-i> :Tradeship<CR>

The first time tradeship runs in a project directory with many JavaScript files,
it'll take some time to parse and cache dependencies. Future runs will be much
faster.

License

MIT

添加新评论