How to sort numeric and literal columns in Vim

If you have decent shell available, select your numbers and run the command

:'<,'>!sort -n -k 2

If you gonna type this in visual mode, after typing the colon, markers ‘<,’> will appead automatically, and you’ll only have to type the rest of it.

This type of commands (:[motion]!) is called filtering. You can learn more by consulting vim’s help:

:h filter

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)