Is there a way to sort multi-line imports with vim built-in functionality (in alphabetical order)?
eg.
import Fred import Foo, Baz,\ Bar, Spam, Eggs import Python
It should become:
import Foo, Baz,\ Bar, Spam, Eggs import Fred import Python
I checked: help sort. In particular, pattern matching comes close to what I want, but it leaves the imported classes separate under the sorted block.
source share