On Mon, Oct 12, 2009 at 6:56 PM, John Beckett <[email protected]>wrote:

>
> Jeri Raye wrote:
> > can you let vim count the occurences of these words and add a
> > number before them and delete all but the first one?
>
> This is straight from Believe It Or Not:
> http://vim.wikia.com/wiki/Word_frequency_statistics_for_a_file
>
> I mention that tip more for the entertainment of regulars than
> as a practical solution because the tip is not presented in a
> very helpful manner. However, I have tried it, and it really
> does count all words in the current file (not exactly what you
> asked for).
>
> John
>
>
> >
>
Hahaha. Brilliant -- it's actually an implementation of the map reduce word
count algorithm in vim. I've used something similar to the 3rd step before
to create a list of numbers in increasing order (i.e.
10i0<CR><ESC>10kqqvawyjvawp^a...@q) and I *almost* suggested something along
these lines but figured no one would want such a solution. Lol. Thanks for
sharing!

-- 
Christopher Suter
www.grooveshark.com

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

Reply via email to