to automatically add
import x from 'y' statements at the top of the file.
ImportJS is meant to be used as a Pathogen plugin. Just
git clone this repo
bundles folder and you are good to go!
git clone firstname.lastname@example.org:Galooshi/vim-import-js.git ~/.vim/bundle/vim-import-js
You need import-js installed globally to use this plugin.
npm install -g import-js
By default, ImportJS attempts to set up the following mappings:
||Import the module for the variable under the cursor.|
||Import any missing modules and remove any modules that are not used.|
||Go to the module of the variable under the cursor.|
import-js configuration see https://github.com/Galooshi/import-js#configuration
If you run into issues when using the plugin, adding some logging can help. After starting up vim, and before you've imported anything, run this command:
:call ch_logfile('channel_log.txt', 'w')
After this, you should get useful information in