ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

isorted

by rimvaliulin ALL

isort integration for Sublime Text

Details

Installs

  • Total 25
  • Win 5
  • Mac 13
  • Linux 7
Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5
Windows 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0
Mac 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

isorted

isort integration for Sublime Text

     __
    / /               __           __
   ---________  _____/ /____  ____/ /
  / / ___/ __ \/ ___/ __/ _ \/ __  /
 / /__  / /_/ / /  / /_/  __/ /_/ /
/_/____/\____/_/   \__/\___/\__,_/
isort - isort your imports, so you don't have to.

Table Of content

Installation | Usage | Settings | Key Bindings | Issues | Thanks | Changelog | Contributing | Authors

Installation

  1. Install isort min (19.3b0) (if you haven't already)
pip3 install isort # Requires python 3.6
  1. In PackageControl just find isort (NOT IN PACKAGE CONTROL YET!)

or

Without PackageControl install manually by navigating to Sublime's Packages folder and cloning this repository

git clone https://github.com/rimvaliulin/isorted.git

Usage

  • Run isort on the current file:

    Press Ctrl-Alt-S (Mac: Cmd-Alt-S) to sort importd in the entire file. You can also Ctrl-Shift-P (Mac: Cmd-Shift-P) and select isorted: Format file.

Settings

isort will always look for settings in the following order:
  • First in a .isort.cfg file
  • Second in the pyproject.toml.
  • Then setup.cfg, tox.ini, .editorconfig

See: https://pycqa.github.io/isort/docs/configuration/config_files.html

Global settings

Preferences -> Package Settings -> isorted -> Settings :

isorted specifics options

  • isort_command:

    Set custom location. Default = "isort".

  • isort_on_save:

    Black is always run before saving the file. Default = false.

Project settings

Just add isorted as prefix (recommended):

{
    "settings": {
        "isorted.isort_on_save": true
    }
}

A isorted subsettings is still possible:

{
    "settings": {
        "isorted": {
            "isort_on_save": true
        }
    }
}

Key Bindings

Preferences -> Package Settings -> isorted -> Key Bindings :

Copy to user key bindings, uncomment, edit keys and and save:

[
    {"keys": ["ctrl+alt+s"], "command": "isort_file", "scope": "source.python"}
]

Issues

If there is something wrong with this plugin, add an issue on GitHub and I'll try to address it.

Thanks

This plugin is very inspired by Sublime text isort plugin and Sublack Plugin. Thanks to Thijs de Zoute and Jimmy Girardet.

Changelog

see CHANGELOG

Contributing

  • Remove isorted via Package Control.
  • Fork isorted
  • Clone your isorted fork to your Packages folder (Preferences -> Browse Packages...).
  • Add your name to Authors in the readme.

Authors

Coded by Rim Valiulin

Contributions by:

  • ...

Todo

  • Fix error 'You may need to install isort and/or configure 'isort_command' in isorted's settings.' on new Sublime Text startup after reboot (needs Sublime Text restart).