Eric Leenman wrote:

Hi,

I have file which contains hexadecimal numbers like below:

04F  ---  05F  ---  052  ---  188  ---  2D4  ---  173  ---  040  ---  18D
051  ---  040  ---  05F  ---  1CA  ---  2E8  ---  14F  ---  040  ---  1E2
051  ---  040  ---  069  ---  1B9  ---  2D7  ---  15E  ---  040  ---  1A6
051  ---  040  ---  06F  ---  1ED  ---  2EB  ---  12E  ---  040  ---  209
051  ---  040  ---  078  ---  1F9  ---  2E3  ---  122  ---  040  ---  220
051  ---  045  ---  063  ---  1C8  ---  2D1  ---  146  ---  040  ---  1F4
051  ---  046  ---  05A  ---  1BB  ---  2D7  ---  158  ---  040  ---  1D3
051  ---  052  ---  04F  ---  1B6  ---  2E3  ---  154  ---  040  ---  1BB
052  ---  040  ---  045  ---  1BC  ---  2D6  ---  146  ---  040  ---  1CE
052  ---  040  ---  04A  ---  1BC  ---  2DD  ---  146  ---  040  ---  1D3

How can I sort the columns so that they are as the first column?

May I suggest looking at:

http://vim.sourceforge.net/tips/tip.php?tip_id=588 : "How to sort using visual blocks"

which discusses

* how to sort visual-block selected columns (independently of surrounding text), and * how to sort lines based on the contents of a visual-block selected columns.

Regards,
Chip Campbell

Reply via email to