How do I sort a section of my file?

You use the “:sort” command like this: :5,100sort Using the “:sort” command provides many options, you can sort numerical on the first found decimal number using: :%sort n Or you can specify to sort on the text, starting at virtual column 8: :%sort /.*\%8v/ Alternatively can pipe a section of the file to the Unix “sort” utility to sort the file. For example:

    :5,100!sort

You can also use a visual block, and use the “!sort” command on the selected block. See also: :sort filter

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind