Created
May 21, 2011 15:22
-
-
Save dhwthompson/984602 to your computer and use it in GitHub Desktop.
A snippet of Vim code to sort the current contiguous line block: useful for Python imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:?^$?+1,/^$/-1sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately doesn’t work on the first block of a file: my Vim-fu isn’t yet sufficient to work out a better way.