g/if\s\+(.*)\s*\n\s\+{\s*$/ normal J
Will do it, but will only work on if lines that compose a single line
and have comments to gum up the works.
Now that I've given you something of value, why in gods name would you
want to? BSD/Allman Style is so much more legible for most code than
K&R/Kernel Style.
I don't want this to become a brace war argument, but why is K&R preferable?
On 10/25/07, Shafik <[EMAIL PROTECTED]> wrote:
>
> Hi,
> a beginner question, can I reformat entire file code from:
> if (...)
> {
> // some action
> }
>
> to:
> if (...) {
> // some action
> }
>
> Thanx.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---