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 182 remaining solutions by signing in and submitting your own entry
#183 铃舟 / @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

183 active golfers, 832 entries

Leaderboard (lowest score wins):
61
#151 - Raimondas Kazlauskas / @RhymondK

03/29/2022 at 11:15AM

61
#152 - August Sunday / @aoa_sundays

04/13/2022 at 03:11AM

61
#153 - Kiran Rajpurohit / @KiranClose

07/30/2022 at 03:23PM

62
#154 - anonymouse / @anonymo65837183

04/02/2022 at 09:14PM

62
#155 - Benjamin McCown / @beanmccown

04/06/2022 at 10:19PM

62
#156 - tuck / @19emtuck

04/13/2022 at 09:55AM

62
#157 - Ragtime / @TheRagtimeBlues

05/21/2022 at 05:06AM

64
#158 - Van / @dangtrivan15

09/10/2022 at 09:39AM

65
#159 - Enrique Santana / @esantanaya

04/24/2022 at 01:09AM

66
#160 - Nanne Wielinga / @NanneWielinga

07/26/2022 at 07:35AM

66
#161 - 语冰者 / @darcysail

09/20/2022 at 02:27AM

69
#162 - jn / @j1357924

10/26/2022 at 01:36PM

70
#163 - Jan Havránek / @h4vry

06/08/2022 at 05:27PM

72
#164 - damien / @GreatTestyTest

10/16/2022 at 09:50PM

79
#165 - max darling / @maxdarling11

05/05/2022 at 04:05AM

79
#166 - Himanshu Tank / @himanshutank75

10/15/2022 at 08:23PM

83
#167 - Benjamin / @BenjaminBashar

11/21/2022 at 09:14AM

85
#168 - pearlescen7 / @pearlescen7

07/09/2022 at 04:43PM

88
#169 - oboki / @happy_oboki

06/08/2022 at 06:45AM

92
#170 - 盧小小 / @VegetaLu

04/02/2022 at 05:28AM

106
#171 - Alex Liu / @liualexliualex

05/21/2022 at 05:56AM

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

06/17/2022 at 08:13AM

164
#173 - Jakub Parapura / @JakubParapura

05/20/2022 at 03:26PM

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

04/22/2022 at 11:35AM

208
#175 - Ahmed Ashraf / @AhmedAshrafAZ

04/24/2022 at 05:26AM

238
#176 - Ted Kruijff / @kalkran

04/15/2022 at 09:07AM

250
#177 - Urbanovics Péter / @UrbanovicsP

05/05/2022 at 01:51PM

312
#178 - Nick Salesky / @NickSalesky

05/09/2022 at 12:43AM

332
#179 - Raymar Monte / @RaymarMonte

04/18/2022 at 04:21PM

337
#180 - Steven Yuan / @vesteny77

04/21/2022 at 07:26PM