Re: I need a reminder on how to sort a section of text

2019-12-26 Thread Marc Simpson
On Thu, Dec 26, 2019 at 12:14 PM Chris Green  wrote:
>
> On Thu, Dec 26, 2019 at 12:08:25PM -0800, Marc Simpson wrote:
> > On Thu, Dec 26, 2019 at 11:43 AM Chris Green  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! :-)

my pleasure.  happy holidays.



Re: I need a reminder on how to sort a section of text

2019-12-26 Thread Chris Green
On Thu, Dec 26, 2019 at 12:08:25PM -0800, Marc Simpson wrote:
> On Thu, Dec 26, 2019 at 11:43 AM Chris Green  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



Re: I need a reminder on how to sort a section of text

2019-12-26 Thread Marc Simpson
On Thu, Dec 26, 2019 at 11:43 AM Chris Green  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