Sort Python Imports — Sort Python imports by module/package name
Vim script
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
plugin
.gitignore
CHANGELOG.md
CODE_OF_CONDUCT.md
LICENSE.txt
README.md

README.md

SPI.vim

Sort Python imports by module/package name.

SPI demo

What + Why

SPI provides an easy way to sort Python imports by module/package name.

Vim's built-in :sort is great for alphabetically sorting lines, but the inevitable combination of import... and from... means you're gonna' have a Bad Time™.

Say Thanks!

Installation

vim-plug

Plug 'nkantar/SPI.vim'

Usage

" select some import lines
:SPI

Contributing

Feel free to create and tackle issues. No, there are no templates at this moment... 😏

You can also get in touch via email 💌 or Twitter 🐦.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.