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

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

221 active golfers, 1315 entries

Solutions by @nak38223985244:
16
#60 - naka / @nak38223985244

08/21/2023 at 01:16PM

17
#>64 - naka / @nak38223985244

08/21/2023 at 01:14PM

21
#>74 - naka / @nak38223985244

08/21/2023 at 01:13PM

22
#>82 - naka / @nak38223985244

08/20/2023 at 01:03PM

23
#>87 - naka / @nak38223985244

08/20/2023 at 12:59PM

23
#>87 - naka / @nak38223985244

08/21/2023 at 01:15PM

24
#>90 - naka / @nak38223985244

08/20/2023 at 12:58PM

25
#>101 - naka / @nak38223985244

08/20/2023 at 12:57PM

26
#>102 - naka / @nak38223985244

08/20/2023 at 12:54PM

27
#>105 - naka / @nak38223985244

08/20/2023 at 12:52PM

28
#>106 - naka / @nak38223985244

08/20/2023 at 12:42PM

29
#>114 - naka / @nak38223985244

08/20/2023 at 02:48AM

30
#>119 - naka / @nak38223985244

08/20/2023 at 02:47AM

32
#>122 - naka / @nak38223985244

08/20/2023 at 02:45AM

33
#>126 - naka / @nak38223985244

08/20/2023 at 02:43AM

34
#>129 - naka / @nak38223985244

08/15/2023 at 01:09PM

39
#>146 - naka / @nak38223985244

08/15/2023 at 01:03PM

43
#>157 - naka / @nak38223985244

06/11/2023 at 12:02PM

45
#>160 - naka / @nak38223985244

06/10/2023 at 02:36AM

56
#>173 - naka / @nak38223985244

06/10/2023 at 02:33AM