:'<,'>sort
Sort numerically:
:'<,'>sort n
Sort on second column:
:'<,'>sort -k 2
:'<,'>sort /.*\%2v/
Sort and remove duplicated lines:
:'<,'>sort u
Reference:
http://stackoverflow.com/questions/1355004/how-to-sort-numeric-and-literal-columns-in-vim
:'<,'>sort
:'<,'>sort n
:'<,'>sort -k 2
:'<,'>sort /.*\%2v/
:'<,'>sort u
No comments:
Post a Comment