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 43 remaining solutions by signing in and submitting your own entry
#44 Austin Ware / @AustinWare17 - Score: 36 - 03/13/18 @ 05:30
/si<CR>wa<CR><Tab><Tab><Esc>/tw<CR>wa<CR><Esc>/se<CR>wa<CR><Esc>/fi<CR>wa<CR><Esc>ZZ

0 comments


Created by: @udioica

44 active golfers, 98 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 - Chasetopher / @chasetopherlee

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

13
#16 - Ben M / @Sweet_Scientist

06/07/2019 at 04:56AM

13
#17 - russellzhaomao / @russellzhaomao

06/07/2022 at 11:20AM

13
#18 - Janzen / @__Coos

09/28/2022 at 12:34PM

13
#19 - dadams2 / @dadams217

02/03/2023 at 06:41AM

14
#20 - Marcin Szamotulski / @me_coot

12/02/2012 at 01:23PM

14
#21 - Pawel Obrok / @mrYapee

12/03/2012 at 01:37PM

14
#22 - Lari / @larifariman

12/27/2012 at 10:54PM

14
#23 - Alec Goebel / @zego5360

01/04/2013 at 05:19PM

14
#24 - Larry Boltovskoi / @larrybolt

12/08/2013 at 02:05AM

14
#25 - billy montgomery / @billymont

10/06/2017 at 06:34AM

15
#26 - Lieven Keersmaekers / @LievenKeersmaek

12/02/2012 at 03:35PM

15
#27 - Conner McDaniel / @connermcd

12/02/2012 at 06:02PM

15
#28 - Tyler / @tylerbindon

04/03/2013 at 04:46AM

15
#29 - Jesse Nazario / @JesseNazario

04/18/2013 at 02:12PM

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

08/02/2014 at 09:09AM