All Projects β†’ Galooshi β†’ sublime-import-js

Galooshi / sublime-import-js

Licence: MIT license
Sublime Text plugin for ImportJS

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to sublime-import-js

sublime-live-server
🌍️ Launch a Development Server directly from Sublime Text
Stars: ✭ 49 (+104.17%)
Mutual labels:  sublime, sublime-plugin
bolt-sublime
Syntax highlighting for Bolt and Sublime
Stars: ✭ 26 (+8.33%)
Mutual labels:  sublime
Sublime-uroboroSQL-formatter
Beautiful SQL Formatter for Sublime Text 3
Stars: ✭ 25 (+4.17%)
Mutual labels:  sublime-plugin
dotfiles
Setup git, vim, zsh, SublimeText, tmux etc. using one command
Stars: ✭ 107 (+345.83%)
Mutual labels:  sublime
bioSyntax-archive
Syntax highlighting for computational biology
Stars: ✭ 16 (-33.33%)
Mutual labels:  sublime
ProColors
A collection of coding themes for syntax highlighting and the editors that are designed to be available in dark and light modes with a very high precision of harmony and token definition coverage.
Stars: ✭ 94 (+291.67%)
Mutual labels:  sublime
sublime
Repository for the Tandem Sublime Plugin
Stars: ✭ 22 (-8.33%)
Mutual labels:  sublime
Sublime-Pretty-Shell
🐚 Shell Script Formatter / Syntax Checker (Powered by shfmt)
Stars: ✭ 28 (+16.67%)
Mutual labels:  sublime-plugin
vscode-expand-selection-to-scope
Extension that introduces a command to incrementally expand the selection to the nearest outer scope.
Stars: ✭ 17 (-29.17%)
Mutual labels:  sublime
dotfiles
My dotfiles (vim/conky/etc.)
Stars: ✭ 79 (+229.17%)
Mutual labels:  sublime
GoDebug
Go debugger (Delve) integration with Sublime Text 3
Stars: ✭ 20 (-16.67%)
Mutual labels:  sublime
simple-ftp-deploy
This package for Sublime Text 3 give you possibility to auto upload file to FTP server when you save local file.
Stars: ✭ 16 (-33.33%)
Mutual labels:  sublime-plugin
themeX
The ultimate UNIVERSAL syntax color theme generator that let's you build your color scheme in just one file and compile for a wide range of different editors.
Stars: ✭ 26 (+8.33%)
Mutual labels:  sublime
sublime-import-helper
A Sublime Text Plugin that helps you to import your modules.
Stars: ✭ 69 (+187.5%)
Mutual labels:  sublime-plugin
zephir-sublime
Sublime Text syntax highlighting for for Zephir
Stars: ✭ 41 (+70.83%)
Mutual labels:  sublime-plugin
sublime-simple-import
A Sublime Text Plugin that helps you to import your modules.
Stars: ✭ 15 (-37.5%)
Mutual labels:  sublime
sublime-jasmine
Jasmine syntax, snippets and commands
Stars: ✭ 24 (+0%)
Mutual labels:  sublime
sublime-zig-language
Zig language support for Sublime Text
Stars: ✭ 62 (+158.33%)
Mutual labels:  sublime
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (-41.67%)
Mutual labels:  sublime
elixir-sublime-syntax
The most powerful Elixir for the most Sublime experience.
Stars: ✭ 28 (+16.67%)
Mutual labels:  sublime

ImportJS is a tool that helps you import dependencies in your JavaScript project. More information is available in the main import-js project.

Running import-js in Sublime Text

  1. Install the ImportJS plugin via Package Control

  2. Install the import-js npm package

    npm install -g import-js
  3. Configure import-js

  4. Open the root of your project as a folder (Project -> Add Folder to Project…)

  5. Import a file!

    Whenever you have undefined variables, open the Command Palette (CTRL+SHIFT+P/CMD+SHIFT+P) and select "ImportJS: fix all imports", or "ImportJS: import word under cursor".

It will be helpful to bind import_js to easy-to-use bindings, such as:

{ "keys": ["super+alt+i"], "command": "import_js", "args": { "command": "fix" } },
{ "keys": ["super+alt+j"], "command": "import_js", "args": { "command": "word" } },
{ "keys": ["super+alt+g"], "command": "import_js", "args": { "command": "goto" } },

Available commands:

  • "ImportJS: fix all imports"
  • "ImportJS: import word under cursor"
  • "ImportJS: goto module"
  • "ImportJS: terminate daemon"

Troubleshooting

If you get an error message saying something like "Can't find import-js executable", you may need to specify a path to the importjs executable in configuration. This likely means that you are using a tool like nvm or nodenv to manage multiple Node versions on your system.

To fix this, you need to make sure that the code that sets up your PATH is in the correct location. This plugin will open a login shell to determine the proper PATH, so the code that sets up your PATH needs to be in a file that is sourced for login shells. Here's a handy table:

Shell File
bash ~/.bash_profile
zsh (Mac OS X) ~/.zprofile
zsh (Linux) ~/.zshenv or ~/.zprofile
fish ~/.config/fish/config.fish

Alternatively, you can also try editing the ImportJS User Settings from the Preferences > Package Settings > ImportJS > Settings β€” User menu and add the folder where the importjs executable is located to the paths option. Example:

{
  "paths": ["/Users/USERNAME/.nvm/versions/node/v4.4.3/bin"]
}

Please note that you can't use ~ to refer to the home directory, you need to specify the full path. To figure out where your importjs executable is located, you can run which importjs from your project's directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].