Skip to main content

Command Palette

Search for a command to run...

Sort Text Lines with VIM

Updated
View as Markdown
V
Writer & Software Developer interested in Unix-like systems and Linux.

To sort text lines with VIM you first select the lines you wish to sort with visual mode and then sort them. To execute this task follow the following steps:

  • Place the cursor on the first line you wish to sort.

  • Move the cursor down into the last line you wish to sort.

  • Press: Shift + ;

  • Write the word sort.

  • Press enter.

Now these lines should be sorted out in alphabetical order.