Tuesday, September 1, 2009

RE: improving the :join command

>as you may know, :join suffers from a serious performance issue, when
>joining many lines ( in the order of 10 thousands or more lines).

No disrespect intended, but *why* in B'Harni's Dark Name would you want
to join >10000 lines into 1?!?

Any 'vi' variant is a *line*-based editor, which presumed a modest
line-size for each. Juggling lines back and forth is easy, but heaving
huge MB-sized chunks o' text is just obscene. Add to that syntax-based
highlighting, multiple colors, etc., and all the processing required for
just *1* line adds exponentially to the amount of work involved, let
alone cursor motions, etc.

Dunno, but to me, that seems like using a text editor to edit a .jpg or
.gif or something, ie, not the right tool for the job, even if, through
herculean contortions and torturing the editor's functionality, it *can*
be done.

I'd, if anything, edit the file as needed, save it, then use 'sed',
'tr', etc., to post-process it accordingly. No overhead for syntax,
colorschemes, etc. Ie, use the right tool for the job.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment