-
-
Notifications
You must be signed in to change notification settings - Fork 589
isort Plugins
Utkarsh Gupta edited this page Nov 21, 2020
·
37 revisions
Several plugins have been written that allow you to use isort to add, remove, and sort imports from the comfort of your favorite text editor:
- Kate: https://github.com/timothycrosley/isort#installing-isorts-kate-plugin -written and maintained by @timothycrosley
-
VIM
- https://github.com/fisadev/vim-isort#installation - written and maintained by @fisadev.
-
ALE (isort fixer) -
let g:ale_fixers = {'python': ['isort']}
-
command! -range=% Isort :<line1>,<line2>! isort -
- just add this to your ~/.vimrc - https://github.com/brentyi/isort.vim#installation - written and maintained by @brentyi.
- Just call
:%!isort -
-
Neovim
- https://github.com/stsewd/isort.nvim#install - written and maintained by @stsewd.
- Emacs: https://github.com/paetzke/py-isort.el - written and maintained by @paetzke.
- Sublime: https://github.com/jcugat/sublime-text-isort-plugin#install - written by @thijsdezoete and updated by @jcugat
-
Atom:
- https://github.com/bh/atom-python-isort - written by @bh.
- https://atom.io/packages/atom-isort - fork of the above by @lexicalunit
- https://atom.io/packages/formatters-python - written @ maintained by @utkarshgupta137
- VSCode: https://github.com/Microsoft/vscode-python - written and maintained by @DonJayamanne; now also by @Microsoft
- pre-commit: https://github.com/FalconSocial/pre-commit-python-sorter - written and maintained by @dinoshauer.
-
Pycharm
- Option 1: File Watcher
- Locate your
isort
installation path.- On macOS / Linux / BSD:
$ which isort /home/user/venv/bin/isort # Possible location
- On Windows:
> where isort C:\Users\User\venv\Scripts\isort.exe # Possible location
- On macOS / Linux / BSD:
- Go to
Preferences or Settings -> Tools -> File Watchers
and click+
to add a new watcher:- Name: isort
- File Type: Python
- Scope: Project Files
- Program: <isort_location_from_previous_step>
- Arguments:
$FilePath$
- Output paths to refresh:
$FilePath$
- Working directory:
$ProjectFileDir$
- In Advanced Options
- Uncheck "Auto-save edited files to trigger the watcher"
- Uncheck "Trigger the watcher on external changes"
- Locate your
- Option 2: External Tool
- Option 1: File Watcher
- Your Plugin: If you create a new plugin, please feel free to add a reference to it here.