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

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 46 remaining solutions by signing in and submitting your own entry
#47 Reed Riley / ReedRile - Score: 24 - 08/12/12 @ 19:40
jt*yll4PjjB11PjB10PjB.ZZ

0 comments

#48 Sean Griffin / sgrif - Score: 24 - 08/13/12 @ 01:32
jt*yll4PjjB11PjB10PjB.ZZ

0 comments

#49 Daniel Lundin / danielundin - Score: 25 - 06/17/12 @ 14:12
3W4i <Esc>5W11i <Esc>jB10i <Esc>jB.ZZ

0 comments

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

0 comments

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

0 comments

#52 James / Dronak - Score: 27 - 09/18/14 @ 21:30
/*<CR>4i <Esc>3n10i <Esc>2n.2kb11i <Esc>ZZ

0 comments

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

0 comments

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

0 comments

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

0 comments

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

0 comments

#57 Samuel Ytterbrink / Neppord - Score: 55 - 06/23/12 @ 01: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

#58 Justin Knag / justinknag - Score: 89 - 09/13/14 @ 15:39
j$bhi    <Esc>jjbblllllli           jj<BS><BS><Esc>jbbi           j<BS><Esc>jjkkui          <Esc>jbbi          <Esc>ZZ

0 comments

Created by: buzbone

58 active golfers, 151 entries

Leaderboard (lowest score wins):
16
#1 - Urtica dioica / udioica

08/08/2014 at 10:42AM

16
#2 - John Braxler / braxler

12/22/2014 at 03:28PM

16
#3 - Andres Araya / arayaandresfco

07/25/2016 at 07:14PM

17
#4 - h_east (トロッコ6個) / h_east

06/15/2012 at 11:31AM

17
#5 - Aaron Lake / aaronmlake

06/15/2012 at 11:35AM

17
#6 - Tim Chase / gumnos

06/15/2012 at 01:08PM

17
#7 - Rolf Bjaanes / rolfb

06/15/2012 at 01:35PM

17
#8 - Conner McDaniel / connermcd

06/15/2012 at 02:14PM

17
#9 - Sebastian Kusnier / skusnier

06/15/2012 at 05:26PM

17
#10 - Federico Galassi / federicogalassi

06/18/2012 at 11:36PM

17
#11 - Vitaly Kushner / vkushner

06/21/2012 at 12:08AM

17
#12 - Ilya Ermolin / ermolinis

06/21/2012 at 06:18AM

17
#13 - Ryan O'Connell / Salshammath

06/21/2012 at 01:00PM

17
#14 - abernardes / abernardes

06/21/2012 at 03:46PM

17
#15 - John Dahlström / dahlstromjohn

06/29/2012 at 11:37AM

17
#16 - Rod Knowlton / codelahoma

07/08/2012 at 12:42AM

17
#17 - Alekseyka2 / Alekseyka2

07/13/2012 at 11:53AM

17
#18 - Joseph J. Piché / jjpiche

08/26/2012 at 12:10AM

17
#19 - Trevor Powell / DoomedBunnies

04/16/2013 at 06:47AM

17
#20 - Marco Hinz / _mhinz_

05/24/2013 at 06:02PM

17
#21 - yaon / yaon4

09/10/2013 at 03:04PM

18
#22 - John Whitley / johnwhitley

06/15/2012 at 05:25PM

18
#23 - RusAlex Pletnev / RusAlexander

06/17/2012 at 01:24PM

18
#24 - binoymichael / binoymichael

06/19/2012 at 02:35PM

18
#25 - Pandae / psasqw

06/20/2012 at 10:06PM

18
#26 - James Davis / tripvg

08/04/2012 at 09:25PM

18
#27 - retired account / retired10072015

08/24/2012 at 06:31PM

18
#28 - tmr / tmr314

09/09/2012 at 07:54PM

18
#29 - Johan Berg / _berg85

02/14/2014 at 10:09AM

19
#30 - Justin Love / wondible

06/15/2012 at 01:49PM

19
#31 - Greg Sabo / gregsabo

06/21/2012 at 03:54AM

19
#32 - Steve Tjoa / stevetjoa

07/04/2013 at 07:26AM

21
#33 - Øystein Walle / oysteinwalle

06/16/2012 at 05:53PM

21
#34 - 無ん垢の叫び / john_ababa

06/22/2012 at 02:56PM

21
#35 - cj / cj01101

10/22/2013 at 05:24PM

21
#36 - Joonas Pihlajamaa / jokkebk

03/14/2014 at 05:57PM

22
#37 - Sune Simonsen / sunesimonsen

08/27/2012 at 07:07PM

22
#38 - Underhill Labs / underhilllabs

10/30/2012 at 05:32AM

23
#39 - Kerson Hsiao / KersonHsiao

06/15/2012 at 01:07PM

23
#40 - exitmouse / exitmouse

06/20/2012 at 08:36PM

23
#41 - proglottis / proglottis

06/23/2012 at 11:52AM

23
#42 - Aaron Miller / apage43

08/13/2012 at 01:58AM

23
#43 - Michael Limiero / michaellimiero

08/13/2012 at 11:42PM

23
#44 - Édouard M'tou / DouardM

10/09/2012 at 12:05PM

23
#45 - powertomato / powertomato

07/04/2013 at 08:22AM

24
#46 - Glen / Glen_S

08/01/2012 at 01:22PM

24
#47 - Reed Riley / ReedRile

08/12/2012 at 07:40PM

24
#48 - Sean Griffin / sgrif

08/13/2012 at 01:32AM

25
#49 - Daniel Lundin / danielundin

06/17/2012 at 02:12PM

27
#50 - noom narze / NarzE

06/15/2012 at 11:36AM

27
#51 - Nipunn Koorapati / nipunn1313

07/21/2012 at 05:32PM

27
#52 - James / Dronak

09/18/2014 at 09:30PM

28
#53 - Toto l'haricot / nico_le_terribl

07/05/2012 at 06:15PM

29
#54 - guotuofeng / guotuofeng

11/09/2012 at 09:26AM

30
#55 - Nikita Mikhaylov / nslqqq

07/08/2012 at 02:55PM

32
#56 - Arto Vuori / dhpe

08/31/2012 at 07:06PM

55
#57 - Samuel Ytterbrink / Neppord

06/23/2012 at 01:48AM

89
#58 - Justin Knag / justinknag

09/13/2014 at 03:39PM