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

233 active golfers, 1093 entries

Leaderboard (lowest score wins):
29
#31 - Lory / @Lory46845742

07/23/2022 at 06:48AM

29
#32 - Danilo J. S. Bellini / @danilobellini

07/24/2022 at 09:36PM

29
#33 - loupiot.veloce / @LoupiotVeloce

07/25/2022 at 12:16PM

29
#34 - Alex / @AlexanderHeatl2

08/10/2022 at 08:04PM

29
#35 - shw / @shw9453

09/08/2022 at 03:12AM

29
#36 - Eivind Jahren / @HaskellElephant

09/12/2022 at 07:16PM

29
#37 - Leroy Jenkins / @LeroyJe70429357

09/15/2022 at 04:22AM

29
#38 - math is what I hate / @mpnmbn

09/20/2022 at 07:37PM

29
#39 - Janzen / @__Coos

10/07/2022 at 06:19AM

29
#40 - Topvimgolf Score / @topvimgolfscore

10/15/2022 at 10:05AM

29
#41 - andrewalker@mastodon.green / @andrewalkernet

11/08/2022 at 02:18PM

29
#42 - vuems / @vuems2win

11/12/2022 at 02:59PM

29
#43 - Lars Winderling / @kaHaleMaKai

11/30/2022 at 07:17PM

29
#44 - Michał / @Micha46184564

12/11/2022 at 04:04PM

29
#45 - 蛙爹 / @Joe53572723

02/21/2023 at 06:12AM

29
#46 - 黄高昂 / @suewiq

03/02/2023 at 02:56AM

29
#47 - FirstModus / @Nolimimer

04/08/2023 at 09:51PM

29
#48 - Ортемон / @the_ortemon

07/04/2023 at 01:00PM

29
#49 - moh ayaya / @AyayaMoh

08/20/2023 at 01:40PM

29
#50 - naka / @nak38223985244

09/03/2023 at 08:47AM

29
#51 - Monkey Boy / @monkey29089

09/23/2023 at 05:32AM

29
#52 - Geoff Liu / @geoff_liu

09/23/2023 at 09:51PM

29
#53 - Philipp Schilk / @philipp_schilk

09/30/2023 at 03:56PM

29
#54 - 7733865@qq.com / @tjxwg

10/15/2023 at 09:14AM

29
#55 - scpchicken / @scpchick

10/17/2023 at 07:12PM

29
#56 - Laurens De la Marche / @LaurensDLM

10/18/2023 at 11:38AM

29
#57 - Luoyb / @Luoyb

10/21/2023 at 05:09AM

29
#58 - tien / @tien40766111

11/13/2023 at 12:20PM

30
#59 - trafficone / @trafficone

05/03/2022 at 03:21PM

30
#60 - Monti L / @MT_Lai

05/26/2022 at 01:20PM