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 50ba20af5b346c0002000035

Python: Lots of function arguments

The function definition is too long for one line. The modeline helps you with some typical Python indent settings.

Start file
class Pointless:
    def lotsa_arguments(self, first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, sixteenth, seventeenth, eighteenth, nineteenth, twentieth, twenty_first, twenty_second, twenty_third):
        "Doesn't even use all those arguments. What a waste."
        pass


# File-specific indent settings!
# More VimGolf challenges need modelines.
# vim: set sw=4 et ft=python:
End file
class Pointless:
    def lotsa_arguments(self, first, second, third, fourth, fifth, sixth,
                        seventh, eighth, ninth, tenth, eleventh, twelfth,
                        thirteenth, fourteenth, sixteenth, seventeenth,
                        eighteenth, nineteenth, twentieth, twenty_first,
                        twenty_second, twenty_third):
        "Doesn't even use all those arguments. What a waste."
        pass


# File-specific indent settings!
# More VimGolf challenges need modelines.
# vim: set sw=4 et ft=python:

View Diff

2c2,6
<     def lotsa_arguments(self, first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, sixteenth, seventeenth, eighteenth, nineteenth, twentieth, twenty_first, twenty_second, twenty_third):
---
>     def lotsa_arguments(self, first, second, third, fourth, fifth, sixth,
>                         seventh, eighth, ninth, tenth, eleventh, twelfth,
>                         thirteenth, fourteenth, sixteenth, seventeenth,
>                         eighteenth, nineteenth, twentieth, twenty_first,
>                         twenty_second, twenty_third):

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 29 remaining solutions by signing in and submitting your own entry
#30 Yann Moisan / YannMoisan - Score: 16 - 01/27/13 @ 12:59
/ sev<CR>i<CR><Tab><Tab><Esc>gq$ZZ

0 comments

#31 Chris Berragan / ChrisBerragan - Score: 16 - 02/04/13 @ 19:03
/ sev<CR>i<CR><Tab><Tab><Esc>gq$ZZ

0 comments

#32 François Marais / maraisf - Score: 16 - 09/16/14 @ 18:47
/ sev<CR>i<CR><Tab><Tab><Esc>gq$ZZ

0 comments

#33 James / Dronak - Score: 16 - 09/21/14 @ 02:18
j7f,lxi<CR><Tab><Tab><Esc>gq$ZZ

0 comments

#34 Sebastien MICHEL / michoux - Score: 23 - 12/06/12 @ 13:43
:2s/ sev/<C-V><CR><Tab><Tab><Tab>sev<CR>gq$ZZ

0 comments

#35 Niil Öhlin / Niil94 - Score: 29 - 03/04/13 @ 21:49
jfxEa<CR><Esc>12i <Esc>6Ea<CR><Esc>4Ea<CR><Esc>4Ea<CR><Esc>ZZ

0 comments

#36 まがい / xxmagai - Score: 29 - 03/02/15 @ 14:16
:se sw=12<CR>jgqq:se sw=4<CR>V3k<ZZ

0 comments

#37 Ravi S Sinha / ambidextrousTx - Score: 31 - 12/02/12 @ 15:57
j9Wi<BS><CR><Tab><Tab><Esc>6WWi<BS><CR><Esc>5Wi<BS><CR><Esc>4WWi<BS><CR><Esc>ZZ

0 comments

Created by: udioica

37 active golfers, 65 entries

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

12/02/2012 at 05:27AM

13
#2 - Hubba / HubbaBubbaFett

12/02/2012 at 09:02AM

13
#3 - DR / dde81

12/04/2012 at 12:14AM

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

12/04/2012 at 10:13AM

13
#5 - Jordan Eldredge / captbaritone

12/05/2012 at 01:02AM

13
#6 - Kerson Hsiao / KersonHsiao

12/23/2012 at 05:19PM

13
#7 - Victor Ramirez / virako

01/22/2013 at 10:26PM

13
#8 - Chase Stubblefield / sterlingchase

04/29/2013 at 05:15AM

13
#9 - Petro Тrouq / zulolosi

05/11/2013 at 09:45PM

13
#10 - Joonas Pihlajamaa / jokkebk

04/01/2014 at 11:18AM

13
#11 - Par Narvi / ParNarvi

04/08/2014 at 01:06PM

13
#12 - Shawn / ShawnSquire

06/02/2014 at 07:18PM

13
#13 - John Braxler / braxler

08/26/2014 at 05:37PM

13
#14 - Jon Krause / jkrause314

01/22/2016 at 04:12AM

13
#15 - Yahyalexandre33 / yahyalexandre33

03/14/2016 at 10:19PM

14
#16 - Marcin Sza / coot_

12/02/2012 at 01:23PM

14
#17 - Pawel Obrok / mrYapee

12/03/2012 at 01:37PM

14
#18 - Lari / larifariman

12/27/2012 at 10:54PM

14
#19 - Alec Goebel / zego5360

01/04/2013 at 05:19PM

14
#20 - Larry Boltovskoi / larrybolt

12/08/2013 at 02:05AM

14
#21 - billy montgomery / billymont

10/06/2017 at 06:34AM

15
#22 - Lieven Keersmaekers / LievenKeersmaek

12/02/2012 at 03:35PM

15
#23 - Conner McDaniel / connermcd

12/02/2012 at 06:02PM

15
#24 - Tyler / tylerbindon

04/03/2013 at 04:46AM

15
#25 - Jesse Nazario / JesseNazario

04/18/2013 at 02:12PM

15
#26 - かしゅーなっつ@修行中 / kashew_nuts

08/02/2014 at 09:09AM

15
#27 - Ethan Chan / metakirby5

02/12/2015 at 08:56AM

16
#28 - Vimgolf Pikob / vimgolfpikob

12/02/2012 at 06:29PM

16
#29 - Chris Maguire / chriswmaguire

12/03/2012 at 04:02PM

16
#30 - Yann Moisan / YannMoisan

01/27/2013 at 12:59PM

16
#31 - Chris Berragan / ChrisBerragan

02/04/2013 at 07:03PM

16
#32 - François Marais / maraisf

09/16/2014 at 06:47PM

16
#33 - James / Dronak

09/21/2014 at 02:18AM

23
#34 - Sebastien MICHEL / michoux

12/06/2012 at 01:43PM

29
#35 - Niil Öhlin / Niil94

03/04/2013 at 09:49PM

29
#36 - まがい / xxmagai

03/02/2015 at 02:16PM

31
#37 - Ravi S Sinha / ambidextrousTx

12/02/2012 at 03:57PM