Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4fdb12a383de630001000005

Aligning function arguments to match a specific coding style

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

Start file
void
clutter_layout_manager_get_preferred_width (ClutterActor *actor,
                                            ClutterContainer *container,
                                            gfloat for_width,
                                            gfloat *min_width_p,
                                            gfloat *natural_width_p)
{
}
End file
void
clutter_layout_manager_get_preferred_width (ClutterActor     *actor,
                                            ClutterContainer *container,
                                            gfloat            for_width,
                                            gfloat           *min_width_p,
                                            gfloat           *natural_width_p)
{
}

View Diff

2c2
< clutter_layout_manager_get_preferred_width (ClutterActor *actor,
---
> clutter_layout_manager_get_preferred_width (ClutterActor     *actor,
4,6c4,6
<                                             gfloat for_width,
<                                             gfloat *min_width_p,
<                                             gfloat *natural_width_p)
---
>                                             gfloat            for_width,
>                                             gfloat           *min_width_p,
>                                             gfloat           *natural_width_p)

Solutions by @ermolinis:

Unlock 5 remaining solutions by signing in and submitting your own entry
Created by: @buzbone

68 active golfers, 227 entries

Solutions by @ermolinis:
17
#19 - Ilya Ermolin / @ermolinis

06/21/2012 at 06:18AM

17
#>19 - Ilya Ermolin / @ermolinis

06/21/2012 at 06:19AM

19
#>38 - Ilya Ermolin / @ermolinis

06/21/2012 at 06:17AM

24
#>53 - Ilya Ermolin / @ermolinis

06/21/2012 at 06:23AM

26
#>57 - Ilya Ermolin / @ermolinis

06/21/2012 at 06:15AM