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 @m3nder__:

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

153 active golfers, 776 entries

Solutions by @m3nder__:
15
#21 - Mens Jender / @m3nder__

08/05/2022 at 11:32AM

21
#>42 - Mens Jender / @m3nder__

08/05/2022 at 11:25AM

22
#>49 - Mens Jender / @m3nder__

08/05/2022 at 11:22AM

23
#>55 - Mens Jender / @m3nder__

08/05/2022 at 11:21AM

25
#>64 - Mens Jender / @m3nder__

08/05/2022 at 11:20AM

28
#>70 - Mens Jender / @m3nder__

08/05/2022 at 11:18AM

29
#>74 - Mens Jender / @m3nder__

08/05/2022 at 11:16AM

30
#>81 - Mens Jender / @m3nder__

08/05/2022 at 11:15AM

32
#>83 - Mens Jender / @m3nder__

08/05/2022 at 11:14AM

33
#>87 - Mens Jender / @m3nder__

08/05/2022 at 11:12AM

34
#>87 - Mens Jender / @m3nder__

08/05/2022 at 11:09AM

40
#>105 - Mens Jender / @m3nder__

08/05/2022 at 11:05AM

48
#>113 - Mens Jender / @m3nder__

08/05/2022 at 11:00AM