Hi,

bill lam wrote:
> I have to print on paper something like this,
> 
> 111111111
> 222222222
> 333333333
> 444444444
> 555555555
> 666666666
> 777777777
> ......
> (very long list)
> 
> To be environmental friendly, I would like to reformat it as
> 
> 111111111 222222222 333333333
> 444444444 555555555 666666666
> 777777777 ............
> 
> Command J should be useful, but I want to know how to automate it to
> process to whole file.

if you want to have exactly 3 columns in each line you can use

  :g/^/normal 3J

If the original line count is not a multiple of 3 you will have to join
the last lines manually

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

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

Reply via email to