sponsor Vim development Vim logo Vim Book Ad

sort python imports : this script allows you to sort python imports alphabetically

 script karma  Rating 10/6, Downloaded by 1360  Comments, bugs, improvements  Vim wiki

created by
Krzysiek Goj
 
script type
utility
 
description
Keep your imports tidy!
This script allows you to sort python imports easlily.

Use :PyFixImports, command to fix imports in the beginning of currently edited file.                                                
You can also use visual mode to select range of lines and then use <C-i> to sort imports in those lines.

Needs vim compiled with python support!
 
install details
Just put it in your plugin directory.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
sort_python_imports.vim 1.2 2008-05-17 7.0 Krzysiek Goj bugfix: from foo import (bar, baz)
Now requires only python 2.3 (patch from Konrad Delong)
sort_python_imports.vim 1.1 2008-05-02 7.0 Krzysiek Goj Bugfix: now works for 'from foo.bar import baz' style imports
sort_python_imports.vim 1.0 2008-05-01 7.0 Krzysiek Goj Initial upload
ip used for rating: 54.174.85.205

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github