[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I need a reminder on how to sort a section of text
From: |
Marc Simpson |
Subject: |
Re: I need a reminder on how to sort a section of text |
Date: |
Thu, 26 Dec 2019 12:08:25 -0800 |
On Thu, Dec 26, 2019 at 11:43 AM Chris Green <address@hidden> wrote:
>
> It's been too long since I did this and I can't remember the way to do
> it.
>
> I want to sort a block of lines of text.
you can use the ! operator with a motion, e.g.
1G!Gsort
which will move to the first line, and sort through the end of file
(last line, G). with marks 'a' and 'b' set, that would be:
'a!'bsort
alternatively, you can do everything from the command prompt.
assuming you have the same two marks set:
:'a,'b!sort
will do the trick.
/m