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 276 remaining solutions by signing in and submitting your own entry
#277 铃舟 / @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: @philipp_schilk

277 active golfers, 1294 entries

Leaderboard (lowest score wins):
64
#241 - Van / @dangtrivan15

09/10/2022 at 09:39AM

64
#242 - riandrake / @riandrake

02/06/2024 at 09:03PM

64
#243 - dennis / @nagolove

04/25/2024 at 12:40PM

65
#244 - Enrique Santana / @esantanaya

04/24/2022 at 01:09AM

66
#245 - Nanne Wielinga / @NanneWielinga

07/26/2022 at 07:35AM

66
#246 - 语冰者 / @darcysail

09/20/2022 at 02:27AM

69
#247 - jn / @j1357924

10/26/2022 at 01:36PM

70
#248 - Jan Havránek / @h4vry

06/08/2022 at 05:27PM

72
#249 - damien / @GreatTestyTest

10/16/2022 at 09:50PM

79
#250 - max darling / @maxdarling11

05/05/2022 at 04:05AM

79
#251 - Himanshu Tank / @himanshutank75

10/15/2022 at 08:23PM

80
#252 - Bùi Lê Huỳnh / @wyattbui

06/14/2024 at 05:08PM

81
#253 - KoroneListener / @KoroneListener

09/05/2024 at 05:38PM

83
#254 - Benjamin / @BenjaminBashar

11/21/2022 at 09:14AM

85
#255 - pearlescen7 / @pearlescen7

07/09/2022 at 04:43PM

88
#256 - oboki / @happy_oboki

06/08/2022 at 06:45AM

92
#257 - 盧小小 / @VegetaLu

04/02/2022 at 05:28AM

92
#258 - Stephen / @szhanggg

01/08/2024 at 12:59AM

106
#259 - Alex Liu / @liualexliualex

05/21/2022 at 05:56AM

117
#260 - Rodney Visser / @_Radnus

04/04/2024 at 10:03PM

117
#261 - amberg12 / @amberg12

08/02/2024 at 08:15PM

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

06/17/2022 at 08:13AM

164
#263 - Jakub Parapura / @JakubParapura

05/20/2022 at 03:26PM

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

04/22/2022 at 11:35AM

201
#265 - Jason Rojas / @jasonrojas

08/26/2024 at 07:15PM

208
#266 - Ahmed Ashraf / @AhmedAshrafAZ

04/24/2022 at 05:26AM

238
#267 - Ted Kruijff / @kalkran

04/15/2022 at 09:07AM

250
#268 - Urbanovics Péter / @UrbanovicsP

05/05/2022 at 01:51PM

283
#269 - Gabriel-Dropout / @Gabriel-Dropout

06/22/2024 at 03:10PM

312
#270 - Nick Salesky / @NickSalesky

05/09/2022 at 12:43AM