All Projects → vinpac → sublime-simple-import

vinpac / sublime-simple-import

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

Programming Languages

python
139335 projects - #7 most used programming language

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

eRCaGuy dotfiles
.bashrc file, terminal prompt that shows current git branch, Arduino setup, Eclipse setup, git diff with line numbers, helpful scripts, improved Linux productivity, etc.
Stars: ✭ 84 (+460%)
Mutual labels:  sublime, sublime-text
Sublime Markdown Extended
Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
Stars: ✭ 645 (+4200%)
Mutual labels:  sublime, sublime-text
Coffeescript Sublime Plugin
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
Stars: ✭ 296 (+1873.33%)
Mutual labels:  sublime, sublime-text
mjml-syntax
Sublime package for the MJML
Stars: ✭ 44 (+193.33%)
Mutual labels:  sublime, sublime-text
Nord Sublime Text
An arctic, north-bluish clean and elegant Sublime Text theme.
Stars: ✭ 109 (+626.67%)
Mutual labels:  sublime, sublime-text
Nineties
💾 Colors for World Wide Web pioneers
Stars: ✭ 16 (+6.67%)
Mutual labels:  sublime, sublime-text
Sublimeallautocomplete
Extend Sublime autocompletion to find matches in all open files of the current window
Stars: ✭ 906 (+5940%)
Mutual labels:  sublime, sublime-text
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (-6.67%)
Mutual labels:  sublime, sublime-text
Six
New and improved Vim emulation for Sublime Text
Stars: ✭ 128 (+753.33%)
Mutual labels:  sublime, sublime-text
sublime
Repository for the Tandem Sublime Plugin
Stars: ✭ 22 (+46.67%)
Mutual labels:  sublime, sublime-text
Milotic
Color Full Theme for All Text Editors!
Stars: ✭ 23 (+53.33%)
Mutual labels:  sublime, sublime-text
Productive Sublime Snippets Ruby
Ruby Snippets for Sublime Text
Stars: ✭ 109 (+626.67%)
Mutual labels:  sublime, sublime-text
sublime-text-2-wpseek
wpseek.com WordPress Developer Assistant for Sublime Text 2 / 3
Stars: ✭ 19 (+26.67%)
Mutual labels:  sublime, sublime-text
Codeatlassublime
Code relationship graph visualization plugin of sublime editor
Stars: ✭ 44 (+193.33%)
Mutual labels:  sublime, sublime-text
sublime-live-server
🌍️ Launch a Development Server directly from Sublime Text
Stars: ✭ 49 (+226.67%)
Mutual labels:  sublime, sublime-text
Ayu
🎨🖌 Modern Sublime Text theme
Stars: ✭ 3,933 (+26120%)
Mutual labels:  sublime, sublime-text
GoDebug
Go debugger (Delve) integration with Sublime Text 3
Stars: ✭ 20 (+33.33%)
Mutual labels:  sublime, sublime-text
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 (+73.33%)
Mutual labels:  sublime, sublime-text
Text Pastry
Extend the power of multiple selections in Sublime Text. Modify selections, insert numeric sequences, incremental numbers, generate uuids, date ranges, insert continuously from a word list and more.
Stars: ✭ 782 (+5113.33%)
Mutual labels:  sublime, sublime-text
Css3
The most complete CSS support for Sublime Text
Stars: ✭ 178 (+1086.67%)
Mutual labels:  sublime, sublime-text

Simple Import v1.1.1

Join the chat at https://gitter.im/sublime-simple-import/Lobby

Simple import is a plugin for Sublime Text that imports your modules. Currently it works with Javascript and Python. If you need to import modules in other languages create an Issue.

example gif

Examples

Note: These examples are Javascript-only. Simple Import works with Scss and Python too at the moment.

visibilityActions.js

export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER'
export const SHOW_ALL = 'SHOW_ALL'
export const SHOW_COMPLETED = 'SHOW_COMPLETED'
export const SHOW_ACTIVE = 'SHOW_ACTIVE'

VisibleTodoList.js

// SHOW_ALL *Ctrl+Alt+J*
import { SHOW_ALL } from '../actions/visibilityActions'

// SHOW_COMPLETED *Ctrl+Alt+J*
import { SHOW_ALL, SHOW_COMPLETED } from '../actions/visibilityActions'

// visibilityActions *Ctrl+Alt+J*
import visibilityActions, {
    SHOW_ALL,
    SHOW_COMPLETED,
} from '../actions/visibilityActions'
// It also breaks your imports by the smallest rule

// Simple Import looks into your package.json
// and find files and variables inside your dependencies's folders.
// For example
// connect *Ctrl+Alt+J*
import { connect } from 'redux';

// combineReducers *Ctrl+Alt+J*
import { connect, combineReducers } from 'redux';

// req react *Ctrl+Alt+J*
const react = require("react")

Installation

You can find this plugin in Packages Control by the name of "Simple Import". You can also clone it in you packages folder.

  • Open the Command Palette and find Browse Packages. Select it and the packages folder will open.
  • Clone this repository in this folder
    • On Terminal, clone this repository: git clone https://github.com/vinpac/sublime-simple-import.git
    • or Download this repository as rar and put the content inside the packages folder

Javascript

Javascript, by default, will add suffix to decorators. For Example @autobind becomes Import autobind from 'autobind-decorator';. It can also look into your dependencies for exported values and even find submodules if the modules exports an object. For example in draft-js.

var DraftPublic = {
  Editor: DraftEditor,
  // ...
};

module.exports = DraftPublic;

SI will look into this file and understand it exports an object with the key Editor. So, if you try to import Editor in your project. SI will add (or give the option) import { Editor } from 'draft-js'.

Don't worry, it's all cached after the first usage by module version so, if you update your modules, SI will update this module's cached submodules and files.

Settings

extensions (Array) : Extensions to match. Default: [".js", ".jsx"]

remove_extensions (Array) : Remove extensions from path. Default: [".js"]

extra_extensions (Array) : Extensions to match, but SI will not look into these files for submodules. Default: [".png", ".jpg", ".jpeg", ".svg", ".json", ".gif", ".css", ".scss", ".less"]

ignore (Array) : Paths to be ignored when crawling for modules.

omit (Array) : Omited values. Default: [] Example: ["react-redux.connect"] ignores connect that react-redux exports.

dictionary (Object) : Map of module values. For values that won't be found by default, like immutable module. Example:

"dictionary": {
  "modules": {
    "cx": "classnames"
  },
  "modules_exports": {
    "immutable": [
      "Map",
      "Set",
      "Stack",
      "List",
      "Stack"
    ]
  }
}

require_by_default (Boolean) : Prefer require than import. Default: False

add_semicolon (Boolean) : Add ; at the end of the import. Default: True

es5 (Boolean) : Will force require_by_default, add_semicolon and will use var instead of const. Default: False

SCSS

Currently, it finds your .scss files and imports them.

Settings

extensions (Array) : Extensions to match. Default: [".scss"]

extra_extensions (Array) : Extensions of files to match and import as url(<path>). Default: [".jpg", ".png", ".gif", ".svg"]

ignore (Array) : Paths to be ignored when crawling for modules.

single_quotes (Boolean) : Use single quotes instead of double. Default: false

Python

Settings

extensions (Array) : Extensions to match. Default: [".py"]

remove_extensions (Array) : Remove extensions from path. Default: [".py"]

ignore (Array) : Paths to be ignored when crawling for modules.

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].