[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: |
Chris Green |
Subject: |
Re: I need a reminder on how to sort a section of text |
Date: |
Thu, 26 Dec 2019 20:14:20 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Dec 26, 2019 at 12:08:25PM -0800, Marc Simpson wrote:
> 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.
>
Thanks Marc! :-)
--
Chris Green