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 9v00628a9b2f000000000220

Poorly indented Python comments

Fix the alignment of some Python comments as quickly as possible.

Start file
      # Working with enumerations in Python #

from enum import Enum

class Shake(Enum):
    VANILLA = 7
    CHOCOLATE = 4
    COOKIES = 9
    MINT = 3

print(type(Shake.MINT))   #   <enum 'Shake'> 

print(Shake.CHOCOLATE.name)               #    CHOCOLATE
print(Shake.CHOCOLATE.value)                   #     4

print(repr(Shake['COOKIES']))              #  <Shake.COOKIES: 9>

Animal = Enum('Animal', 'ANT BEE CAT DOG')

A = list(Animal); print(A)
# [<Animal.ANT: 1>, <Animal.BEE: 2>, <Animal.CAT: 3>, <Animal.DOG: 4>]
End file
      # Working with enumerations in Python #

from enum import Enum

class Shake(Enum):
    VANILLA = 7
    CHOCOLATE = 4
    COOKIES = 9
    MINT = 3

print(type(Shake.MINT))         # <enum 'Shake'> 

print(Shake.CHOCOLATE.name)     # CHOCOLATE
print(Shake.CHOCOLATE.value)    # 4

print(repr(Shake['COOKIES']))   # <Shake.COOKIES: 9>

Animal = Enum('Animal', 'ANT BEE CAT DOG')

A = list(Animal); print(A)
# [<Animal.ANT: 1>, <Animal.BEE: 2>, <Animal.CAT: 3>, <Animal.DOG: 4>]

View Diff

11c11
< print(type(Shake.MINT))   #   <enum 'Shake'> 
---
> print(type(Shake.MINT))         # <enum 'Shake'> 
13,14c13,14
< print(Shake.CHOCOLATE.name)               #    CHOCOLATE
< print(Shake.CHOCOLATE.value)                   #     4
---
> print(Shake.CHOCOLATE.name)     # CHOCOLATE
> print(Shake.CHOCOLATE.value)    # 4
16c16
< print(repr(Shake['COOKIES']))              #  <Shake.COOKIES: 9>
---
> print(repr(Shake['COOKIES']))   # <Shake.COOKIES: 9>

Solutions by @FraktalRebirth:

Unlock 18 remaining solutions by signing in and submitting your own entry
Created by: @JeanGeo20504212

199 active golfers, 1149 entries

Solutions by @FraktalRebirth:
15
#18 - fraktal / @FraktalRebirth

06/25/2022 at 09:17PM

21
#>61 - fraktal / @FraktalRebirth

06/25/2022 at 09:02PM

22
#>70 - fraktal / @FraktalRebirth

06/25/2022 at 09:00PM

23
#>76 - fraktal / @FraktalRebirth

06/25/2022 at 08:58PM

24
#>77 - fraktal / @FraktalRebirth

06/25/2022 at 08:53PM

29
#>97 - fraktal / @FraktalRebirth

06/25/2022 at 08:38PM

30
#>105 - fraktal / @FraktalRebirth

06/25/2022 at 08:30PM

31
#>108 - fraktal / @FraktalRebirth

06/25/2022 at 08:27PM

33
#>112 - fraktal / @FraktalRebirth

06/25/2022 at 08:18PM

39
#>132 - fraktal / @FraktalRebirth

06/25/2022 at 08:01PM

41
#>136 - fraktal / @FraktalRebirth

06/25/2022 at 07:54PM

42
#>136 - fraktal / @FraktalRebirth

06/25/2022 at 08:09PM

43
#>140 - fraktal / @FraktalRebirth

06/25/2022 at 07:53PM

44
#>145 - fraktal / @FraktalRebirth

06/25/2022 at 07:51PM

46
#>146 - fraktal / @FraktalRebirth

06/25/2022 at 07:48PM

46
#>146 - fraktal / @FraktalRebirth

06/25/2022 at 07:50PM

50
#>149 - fraktal / @FraktalRebirth

06/25/2022 at 07:43PM

188
#>197 - fraktal / @FraktalRebirth

06/25/2022 at 07:22PM