Ⅰ. 插件描述
Sort Python Imports — Sort Python imports by module/package nameⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'nkantar/spi-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'nkantar/spi-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'nkantar/spi-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/nkantar/spi.vim
Ⅳ. 文档说明
# SPI.vim
Sort Python imports by module/package name.

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™.
Installation
vim-plug
Plug 'nkantar/SPI.vim'Usage
" select some import lines
:SPIContributing
Feel free to create and tackle issues. No, there are no templates at this moment... :smirk:
You can also get in touch via email :love_letter: or Twitter :bird:.
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.