Ben Fritz wrote:

> On Tuesday, June 24, 2014 10:39:28 AM UTC-5, Ben Fritz wrote:
> > 
> > I thought your sort could be done in Vim with 2 passes, but unfortunately 
> > it does not work:
> > 
> > sort r /^\d\+/
> > sort! /.*#/
> 
> Bram, any chance that a way to guarantee a stable sort could be
> included, so sorting by multiple fields could be achieved natively?
> I'm guessing you just do a library call right now that does not offer
> such guarantees, but some extra flag to the :sort command could
> perhaps be created for a built-in (stable) sort algorithm. There are
> plenty out there with good performance, probably some open-source code
> we could incorporate as well. Heck, an alternate library call might be
> able to provide it.

Currently we use qsort().

Well, if I get a very nice patch with a better sort implementation there
is a good chance it gets included.  Proving that it's better will take
some effort.  Oh, and also make sure the copyright is taken care of.

-- 
ARTHUR:  Well, I AM king...
DENNIS:  Oh king, eh, very nice.  An' how'd you get that, eh?  By exploitin'
         the workers -- by 'angin' on to outdated imperialist dogma which
         perpetuates the economic an' social differences in our society!  If
         there's ever going to be any progress--
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui