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

isorted

by rimvaliulin ALL

isort integration for Sublime Text

Details

Installs

  • Total 78
  • Win 11
  • Mac 41
  • Linux 26
Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Mac 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 2 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 1
Linux 0 0 0 1 0 0 0 0 1 0 4 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 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).