Ⅰ. 插件描述
Vim plugin to add and update JavaScript import statementsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sukima/vim-javascript-imports'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sukima/vim-javascript-imports'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sukima/vim-javascript-imports'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sukima/vim-javascript-imports
Ⅳ. 文档说明
# vim-javascript-imports
Tired of always looking up module names in the browser? Sick of copy/pasting
JavaScript import lines? Fear not, with this addon you can add and update
import statements with on mapping or command. It can fill in missing import
statements based on the word under the cursor.
It will properly format the import statements even when updating existing ones
and it can wrap long lines--oh and it sorts the variables too.

Out of the box the addon does not add any imports. It is the job of other
plugins to define imports you can use in code. See the documentation
for information on adding your own.
Commands, Mappings and Configuration
Read the help to know more.
Installation
Using Vundle:
Just add this line to your ~/.vimrc:
Plugin 'sukima/vim-javascript-imports'And run :PluginInstall inside Vim.
Using pathogen.vim:
Copy and paste in your shell:
cd ~/.vim/bundle
git clone https://github.com/sukima/vim-javascript-imports.gitUsing vpm:
Run this command in your shell:
vpm insert sukima/vim-javascript-importsUsing Plug:
Just add this line to your ~/.vimrc inside plug call:
Plug 'sukima/vim-javascript-imports'And run :PlugInstall inside Vim or vim +PlugInstall +qa from shell.
License
MIT