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

Generate a very basic Python constructor (fixed)

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

Start file
def __init__(self, x, y, z, rotation, color, bounciness, walking_speed, running_speed, health, defense, age, type1, type2):
End file
def __init__(self, x, y, z, rotation, color, bounciness, walking_speed, running_speed, health, defense, age, type1, type2):
    self.x = x
    self.y = y
    self.z = z
    self.rotation = rotation
    self.color = color
    self.bounciness = bounciness
    self.walking_speed = walking_speed
    self.running_speed = running_speed
    self.health = health
    self.defense = defense
    self.age = age
    self.type1 = type1
    self.type2 = type2

View Diff

1a2,14
>     self.x = x
>     self.y = y
>     self.z = z
>     self.rotation = rotation
>     self.color = color
>     self.bounciness = bounciness
>     self.walking_speed = walking_speed
>     self.running_speed = running_speed
>     self.health = health
>     self.defense = defense
>     self.age = age
>     self.type1 = type1
>     self.type2 = type2

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 218 remaining solutions by signing in and submitting your own entry
#219 铃舟 / @lingzhouVII - Score: 711 - 04/14/22 @ 13:45
jjjjjjjjjjjjjjjlllllllllllllllddidef __init__(self, x, y, z, rotation, color, bounciness, walking_speed, running_speed, health, defense, age, type1, type2):<CR>    self.x = x<CR>    self.y = y<CR>    self.z = z<CR>    self.rotation = rotation<CR>    self.color = color<CR>    self.bounciness = bounciness<CR>    self.walking_speed = walking_speed<CR>    self.running_speed = running_speed<CR>    self.health = health<CR>    self.defense = defense<CR>    self.age = age<CR>    self.type1 = type1<CR>    self.type2 = type2<Esc>kkkkkkkkkkk0lllllllli<BS><BS><BS><BS><Esc>jhhhhhhhh.u4xi<Tab><BS>    <Esc>jllllllllllhhhhhhhhhhhhhd00d0lllllllllllhhi<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><CR><Esc>kxjxhhhhhjxxjxxxjkxxxjxxxxx i  <Esc>jxxxxxxxjxxxxxxxi    <Esc>jkxjixxxxxxxxx<BS><BS><BS><BS><BS><BS><BS><BS><BS><Esc>xxxxxxxxjxxxxxxi <Esc>jxxxxxxxxxjxxxxxxxxxxi    <Esc>:wq<CR>

0 comments


Created by: @TheSchilk

219 active golfers, 995 entries

Leaderboard (lowest score wins):
60
#181 - salchint / @salchint

05/04/2022 at 10:45PM

60
#182 - Ilay Skutelsky / @ISkutelsky

08/01/2022 at 10:15PM

60
#183 - grhkm / @grhkm21

12/20/2022 at 02:34PM

61
#184 - Raimondas Kazlauskas / @RhymondK

03/29/2022 at 11:15AM

61
#185 - August Sunday / @aoa_sundays

04/13/2022 at 03:11AM

61
#186 - ohwell / @KiranClose

07/30/2022 at 03:23PM

62
#187 - anonymouse / @anonymo65837183

04/02/2022 at 09:14PM

62
#188 - Benjamin McCown / @beanmccown

04/06/2022 at 10:19PM

62
#189 - tuck / @19emtuck

04/13/2022 at 09:55AM

62
#190 - Ragtime / @TheRagtimeBlues

05/21/2022 at 05:06AM

62
#191 - Sergio / @SergioVl12

04/22/2023 at 09:52AM

63
#192 - dahan choi / @chedaahh

01/16/2023 at 09:47AM

64
#193 - Van / @dangtrivan15

09/10/2022 at 09:39AM

65
#194 - Enrique Santana / @esantanaya

04/24/2022 at 01:09AM

66
#195 - Nanne Wielinga / @NanneWielinga

07/26/2022 at 07:35AM

66
#196 - 语冰者 / @darcysail

09/20/2022 at 02:27AM

69
#197 - jn / @j1357924

10/26/2022 at 01:36PM

70
#198 - Jan Havránek / @h4vry

06/08/2022 at 05:27PM

72
#199 - damien / @GreatTestyTest

10/16/2022 at 09:50PM

79
#200 - max darling / @maxdarling11

05/05/2022 at 04:05AM

79
#201 - Himanshu Tank / @himanshutank75

10/15/2022 at 08:23PM

83
#202 - Benjamin / @BenjaminBashar

11/21/2022 at 09:14AM

85
#203 - pearlescen7 / @pearlescen7

07/09/2022 at 04:43PM

88
#204 - oboki / @happy_oboki

06/08/2022 at 06:45AM

92
#205 - 盧小小 / @VegetaLu

04/02/2022 at 05:28AM

106
#206 - Alex Liu / @liualexliualex

05/21/2022 at 05:56AM

134
#207 - Хью Джолли / @DzolliH

06/17/2022 at 08:13AM

164
#208 - Jakub Parapura / @JakubParapura

05/20/2022 at 03:26PM

169
#209 - Dončić Stan / @blackmesssi

04/22/2022 at 11:35AM

208
#210 - Ahmed Ashraf / @AhmedAshrafAZ

04/24/2022 at 05:26AM