Thursday, August 15, 2013

Vim: Sort the file contents

Lets say you have a file that looks like this

and all you want to do is get the content rearranged in sorted order. Well here is a quickie , enter visual mode by pressing v , press Shift+g to select entire file and then just execute the sort command.
and bang here is the sorted content.

No comments:

Post a Comment