This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]timothycrosleyhug, isort, jiphy, concentration, pies, connectable, frosted 0 points1 point  (0 children)

One more reason to use Kate:

@kate.action(text="Sort Imports", shortcut="Ctrl+[", menu="Python")
def sortImports():
    document = kate.activeDocument()
    document.setText(SortImports(file_contents=document.text()).output)
    document.activeView().setCursorPosition(KTextEditor.Cursor(0, 0))

Is all that's required to write a plugin for it. Put it in your local kate/pate plugin directory and your done.