Real Vim ninjas count every keystroke - do you?

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

Leaderboard, 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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 37 remaining solutions by signing in and submitting your own entry
#38 Reed Riley / @ReedRile - Score: 24 - 08/12/12 @ 12:40
jt*yll4PjjB11PjB10PjB.ZZ

0 comments

#39 Sean Griffin / @sgrif - Score: 24 - 08/12/12 @ 18:32
jt*yll4PjjB11PjB10PjB.ZZ

0 comments

#40 Daniel Erlandsson / @danneerlandsson - Score: 25 - 06/17/12 @ 07:12
3W4i <Esc>5W11i <Esc>jB10i <Esc>jB.ZZ

0 comments

#41 noom narze / @NarzE - Score: 27 - 06/15/12 @ 04:36
/*<CR>4i <Esc>jqjjB10i <Esc>qi <Esc>@j@@ZZ

0 comments

#42 Nipunn Koorapati / @nipunn1313 - Score: 27 - 07/21/12 @ 10:32
jf*i <Left><Esc>3.4jB10.kB10.kb11.ZZ

0 comments

#43 Toto l'haricot / @nico_le_terribl - Score: 28 - 07/05/12 @ 11:15
<Down>f*4i <Esc><Down><Down>Ff11.<Down>F*.x<Down>;10i <Esc>ZZ

0 comments

#44 guotuofeng / @guotuofeng - Score: 29 - 11/09/12 @ 01:26
/\w\zs\s<CR>nyl4p2n11pn10.n10.ZZ

0 comments

#45 Nikita Mikhaylov / @nslqqq - Score: 30 - 07/08/12 @ 07:55
/*<CR>4i <Esc>2jBqa10i <Esc>jBq2@a2ki <Esc>ZZ

0 comments

#46 Arto Vuori / @dhpe - Score: 32 - 08/31/12 @ 12:06
/*<CR>qai <Esc>q3@a/fo<CR>11@aj10@aj10@aZZ

0 comments

#47 Samuel Ytterbrink / @Neppord - Score: 55 - 06/22/12 @ 18:48
5w<Right><Left><Left>i <Esc>4.<Esc>u3.9w111.<Esc>u11.2w2w.d<Right><Esc>2w2w.<Esc>ui <Esc>8..<Esc>ui <Esc>:wq<CR>

0 comments

Created by: @buzbone

47 active golfers, 117 entries

Leaderboard (lowest score wins):
P1000007_normal
17
#1 - h_east (DDD ready) / @h_east

06/15/2012 at 04:31AM

Img_0812_normal
17
#2 - Aaron Lake / @metallikop

06/15/2012 at 04:35AM

T_e_normal
17
#3 - Tim Chase / @gumnos

06/15/2012 at 06:08AM

Twitter_normal
17
#4 - Rolf Bjaanes / @rolfb

06/15/2012 at 06:35AM

40051_789281885907_29616532_44170636_2091417_n_normal
17
#5 - Conner McDaniel / @connermcd

06/15/2012 at 07:14AM

Astro_seek_normal
17
#6 - Sebastian Kusnier / @skusnier

06/15/2012 at 10:26AM

Q6hrg93p4r3hn56thmd0_normal
17
#7 - Urtica dioica / @udioica

06/16/2012 at 12:25PM

Fepic_normal
17
#8 - Federico Galassi / @federicogalassi

06/18/2012 at 04:36PM

Avatar-new2_normal
17
#9 - Vitaly Kushner / @vkushner

06/20/2012 at 05:08PM

Default_profile_0_normal
17
#10 - Ilya Ermolin / @ermolinis

06/20/2012 at 11:18PM

Wideeyes_normal
17
#11 - Ryan O'Connell / @Salshammath

06/21/2012 at 06:00AM

P1000725_normal
17
#12 - abernardes / @abernardes

06/21/2012 at 08:46AM

Dsc00226_normal
17
#13 - John Dahlström / @dahlstromjohn

06/29/2012 at 04:37AM

Mobile_photo_mar_15__2010_12_39_49_normal
17
#14 - Rod Knowlton / @codelahoma

07/07/2012 at 05:42PM

Default_profile_1_normal
17
#15 - Alekseyka2 / @Alekseyka2

07/13/2012 at 04:53AM

149526_1475690574073_1287977447_31109480_3104807_n_normal
17
#16 - Joseph J. Piché / @jjpiche

08/25/2012 at 05:10PM

Bunnies_normal
17
#17 - Trevor Powell / @DoomedBunnies

04/15/2013 at 11:47PM

Self-avatar-2009_normal
18
#18 - John Whitley / @johnwhitley

06/15/2012 at 10:25AM

9q3yxp1gliit8k2f2ov0_normal
18
#19 - RusAlex Pletnev / @RusAlexander

06/17/2012 at 06:24AM

Img_2698_normal
18
#20 - binoymichael / @binoymichael

06/19/2012 at 07:35AM

Default_profile_0_normal
18
#21 - Pandae / @psasqw

06/20/2012 at 03:06PM

Default_profile_3_normal
18
#22 - James Davis / @tripvg

08/04/2012 at 02:25PM

C0b6948159226d38499a61ceedae5f05_normal
18
#23 - Joseph Reddington / @joereddington

08/24/2012 at 11:31AM

Default_profile_1_normal
18
#24 - tmr / @tmr314

09/09/2012 at 12:54PM

Jlove201003sq_normal
19
#25 - Justin Love / @wondible

06/15/2012 at 06:49AM

Photo3_normal
19
#26 - Greg Sabo / @gregsabo

06/20/2012 at 08:54PM

Avatar_normal
21
#27 - Øystein Walle / @oysteinwalle

06/16/2012 at 10:53AM

Bc879469f279ee24b7fbdfad7c2216d9_normal
21
#28 - 無ん垢の叫び / @john_ababa

06/22/2012 at 07:56AM

Me_normal
22
#29 - Sune Simonsen / @sunesimonsen

08/27/2012 at 12:07PM

Knittingstash_240dpi_72x72_normal
22
#30 - Underhill Labs / @underhilllabs

10/29/2012 at 10:32PM

4654945923_eb2c60ee5f_normal
23
#31 - Kerson Hsiao / @KersonHsiao

06/15/2012 at 06:07AM

Default_profile_6_normal
23
#32 - exitmouse / @exitmouse

06/20/2012 at 01:36PM

Face_normal
23
#33 - proglottis / @proglottis

06/23/2012 at 04:52AM

Temp1346150024strip20120828-29550-y91s9z_normal
23
#34 - Aaron Miller / @apage43

08/12/2012 at 06:58PM

3hrkqpt87oaselzo9qiu_normal
23
#35 - Michael Limiero / @michaellimiero

08/13/2012 at 04:42PM

Default_profile_3_normal
23
#36 - Édouard M'tou / @DouardM

10/09/2012 at 05:05AM

Emblemofroto_normal
24
#37 - Glen / @Glen_S

08/01/2012 at 06:22AM

Fxjqeo1fxqhkf2i965qh_normal
24
#38 - Reed Riley / @ReedRile

08/12/2012 at 12:40PM

312189_10150481221796258_700041257_11172966_434509532_n_normal
24
#39 - Sean Griffin / @sgrif

08/12/2012 at 06:32PM

Twitterprofile_normal
25
#40 - Daniel Erlandsson / @danneerlandsson

06/17/2012 at 07:12AM

Image_normal
27
#41 - noom narze / @NarzE

06/15/2012 at 04:36AM

3b612fef7e817238b64220cf92195639_normal
27
#42 - Nipunn Koorapati / @nipunn1313

07/21/2012 at 10:32AM

Default_profile_1_normal
28
#43 - Toto l'haricot / @nico_le_terribl

07/05/2012 at 11:15AM

Default_profile_1_normal
29
#44 - guotuofeng / @guotuofeng

11/09/2012 at 01:26AM

Default_profile_3_normal
30
#45 - Nikita Mikhaylov / @nslqqq

07/08/2012 at 07:55AM

Dhpe-twitter_normal
32
#46 - Arto Vuori / @dhpe

08/31/2012 at 12:06PM

Msn4_normal
55
#47 - Samuel Ytterbrink / @Neppord

06/22/2012 at 06:48PM