How to sort file rows with vi?

multiple-columns, sorting, vi, vim

Solution

sort by the 2nd col:

:sor /\t/ 

sort by the 3rd col:

:sor /\t[^\t]*\t/   

Problem

I have to edit multiple files with multiple rows, and also everything is in three columns, like this: ``` #file save get go go save get rest place reset ``` Columns are separated with tab. Is there any possible way to sort rows based on second or third column using vi?

Original source