All Projects β†’ unlight β†’ sublime-import-helper

unlight / sublime-import-helper

Licence: MIT license
A Sublime Text Plugin that helps you to import your modules.

Programming Languages

python
139335 projects - #7 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

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

sublime-live-server
🌍️ Launch a Development Server directly from Sublime Text
Stars: ✭ 49 (-28.99%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin, sublime-plugin
zephir-sublime
Sublime Text syntax highlighting for for Zephir
Stars: ✭ 41 (-40.58%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin, sublime-plugin
Sublime-Pretty-Shell
🐚 Shell Script Formatter / Syntax Checker (Powered by shfmt)
Stars: ✭ 28 (-59.42%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin, sublime-plugin
sublime-profiles
Profile Switcher for Sublime Text
Stars: ✭ 59 (-14.49%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin
CSSFontFamily
CSSFontFamily is a Sublime Text plugin with a collection of font stacks autocomplete.
Stars: ✭ 15 (-78.26%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin
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 (-76.81%)
Mutual labels:  sublime-text, sublime-text-plugin, sublime-plugin
sublime-text
Subime Text 相关衄源攢集整理
Stars: ✭ 62 (-10.14%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin
Editorconfig Sublime
Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
Stars: ✭ 1,749 (+2434.78%)
Mutual labels:  sublime-text, sublime-package, sublime-text-plugin
CodeChampion
Plays epic sound clips when you write epic code on sublime Text!
Stars: ✭ 30 (-56.52%)
Mutual labels:  sublime-text, sublime-text-plugin
SublimeXssEncode
Converts characters from one encoding to another using a transformation.
Stars: ✭ 37 (-46.38%)
Mutual labels:  sublime-text, sublime-text-plugin
Sublime zk
A SublimeText3 package featuring ID based wiki style links, and #tags, intended for zettelkasten method users. Loaded with tons of features like inline image display, sophisticated tag search, note transclusion features, support for note templates, bibliography support, support for multiple panes, etc. to make working in your Zettelkasten a joy πŸ˜„.
Stars: ✭ 408 (+491.3%)
Mutual labels:  sublime-text, sublime-package
Sublime Ava
Snippets for AVA
Stars: ✭ 41 (-40.58%)
Mutual labels:  sublime-text, sublime-package
sublime-better-ruby
Sublime Text Ruby package (snippets, builder, syntax highlight)
Stars: ✭ 33 (-52.17%)
Mutual labels:  sublime-text, sublime-text-plugin
Processing Sublime
A Sublime Text package for the programming language Processing
Stars: ✭ 447 (+547.83%)
Mutual labels:  sublime-text, sublime-package
Sublime-uroboroSQL-formatter
Beautiful SQL Formatter for Sublime Text 3
Stars: ✭ 25 (-63.77%)
Mutual labels:  sublime-package, sublime-plugin
Chromerepl
A Sublime Text plugin to execute JavaScript in Google Chrome
Stars: ✭ 347 (+402.9%)
Mutual labels:  sublime-text, sublime-package
Sublimeallautocomplete
Extend Sublime autocompletion to find matches in all open files of the current window
Stars: ✭ 906 (+1213.04%)
Mutual labels:  sublime-text, sublime-package
Carbonsublime
πŸš€ A Sublime Text 3 Plugin for Carbon. (https://carbon.now.sh)
Stars: ✭ 104 (+50.72%)
Mutual labels:  sublime-text, sublime-package
Packagesync
Sync sublime text packages & user settings across devices.
Stars: ✭ 63 (-8.7%)
Mutual labels:  sublime-text, sublime-package
Themr
A UI theme selector for Sublime Text.
Stars: ✭ 112 (+62.32%)
Mutual labels:  sublime-text, sublime-package

sublime-import-helper

A Sublime Text Plugin that helps you to import your modules.

Supported Languages

  • TypeScript
  • JavaScript (ES2015)

Requirements

  • Node.JS 12.0+

Installation

PackageControl

  • Select Package Control: Install Package from command palette
  • Select ImportHelper

Manual Installation

You can install sublime-import-helper manually using git by running the following command within sublime packages directory (Preferences > Browse Packages):

git clone https://github.com/unlight/sublime-import-helper ImportHelper

Install Old version

Check https://github.com/unlight/sublime-import-helper/releases page, dowload source code archive, unzip to Data/Packages/ImportHelper.

Or you can use git, see like in manual installation:

git clone https://github.com/unlight/sublime-import-helper ImportHelper
cd ImportHelper
git checkout -f v2.3.2

Usage

Initialize / Setup / Update modules

  • Restart plugin - update node_modules, source modules

Insert import

  • Set cursor or select word
  • Press ctrl+alt+i, or select the command from command palette

List imports

  • Press alt+i, alt+l, or select the command from command palette

Update source modules

  • Press alt+i, alt+s, or select the command from command palette

Import from clipboard

  • Copy text to clipboard ctrl+c
  • Press alt+i, alt+k, or select the command from command palette

Screenshots

Settings

There are some several configuration settings. Open plugin settings file by opening in menu:
Preferences -> Package Settings -> Import Helper
Also, there are some optional project specific settings.
The precedence of getting of value of setting is following:

  1. Project file
  2. Plugin file settings
  3. Default settings

from_quote

What kind of quotes will be used in import statement.

  • Type: string
  • Default: '

no_semicolon

Remove semicolon at the end of import string.

  • Type: boolean
  • Default: false

insert_space_in_braces

Insert space after opening and before closing non empty braces.

  • Type: boolean
  • Default: true

node_bin

Sometimes sublime cannot find node executable, if it happens. Set node_bin explicitly (e.g. c:/nodejs/node.exe)

  • Type: string
  • Default: '' (auto detect)

import_path_mapping

How to apply path mapping (read more about Module Resolution and Path Mapping).

If enabled implementation will try to find first matching alias.

  • Type: string
  • Enum: ['disabled', 'enabled']
  • Default: enabled

autocomplete_export_names

Show all possible export names from sources and node modules in autocomplete menu.

  • Type: boolean
  • Default: true

autocomplete_auto_import

Automatically add import statement if export name was selected from autocomplete menu (Ctrl + Space).
Requires autocomplete_export_names: true.

  • Type: boolean
  • Default: false

remove_trailing_index

Remove index suffix ending in file path

  • Type: boolean
  • Default: true

import_root (project file only)

Path to your project root folder (not source folder). If not set, tries automatically detect. For single souce folder folders[0].path will be used, for serveral source folders common path will be used.

import_file_extension

Option what to do with file extension in import statement.

  • Type: string
  • Default: remove

Options:

  • remove js/ts/jsx/tsx extension will be removed
  • js js/ts/jsx/tsx will be replaced to js
  • as_is will stay as is

Example of settings in project file:

Example of project file:

{
	"import_root": ".",
	"from_quote": "'",
	"folders": [
		{
			"path": "."
		}
	]
}

Notes for No imports found for ... message

Looks like you do not have opened folders in current Sublime window.

It is recommended to create project from your working files and folders, you can do it in top menu:
Project -> Save project as...
Save project file in any place you want.
Then restart Sublime.

Currently, it is not posssible to detect when project was switched (Project -> Quick Switch Project), in this case you need manually re-initialize plugin:
Select Import Helper: Initialize / Setup / Update modules from command palette

Dev Notes

sublime.log_input(True); sublime.log_commands(True); sublime.log_result_regex(True)
sublime.log_input(False); sublime.log_commands(False); sublime.log_result_regex(False)
python3 -m black .
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].