>>> if you want to have exactly 3 columns in each line you can use
>>>
>>> :g/^/normal 3J
>> Or you can skip the normal command:
>>
>> :g/^/j3
>
> Thank you all for help. I learn three different ways :)
>
> I found a caveat when using gp is that needs set formatoptions-=n to
> work so that for my particular case :g is easier to use.
The two join methods ("norm 3J" and "j3") are for literal "I want
to join 3 lines together". The "gq" method is a generic "join
lines to fill the width I specify" which may be more or less than
3 lines joined together. Both have their place, depending on
which type of behavior you want.
As a side note, if you don't want Vim to automatically add spaces
to your joined lines, you can either use "norm 3gJ" or "j!3"
-tim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---