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 by @CodePirateLuffy:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @udioica

50 active golfers, 119 entries

Solutions by @CodePirateLuffy:
13
#22 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:37AM

14
#>28 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:16AM

16
#>41 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:45AM

21
#>42 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:21AM

23
#>43 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 10:58AM

23
#>43 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:08AM

24
#>44 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 10:52AM

25
#>44 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:34AM

26
#>44 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 10:32AM

28
#>46 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 10:31AM

28
#>46 - CodePirateLuffy / @CodePirateLuffy

10/22/2024 at 11:29AM