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

255 active golfers, 1215 entries

Leaderboard (lowest score wins):
29
#31 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

07/24/2022 at 09:36PM

29
#32 - loupiot.veloce / @LoupiotVeloce

07/25/2022 at 12:16PM

29
#33 - Alex / @AlexanderHeatl2

08/10/2022 at 08:04PM

29
#34 - shw / @shw9453

09/08/2022 at 03:12AM

29
#35 - Eivind Jahren / @HaskellElephant

09/12/2022 at 07:16PM

29
#36 - Leroy Jenkins / @LeroyJe70429357

09/15/2022 at 04:22AM

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

09/20/2022 at 07:37PM

29
#38 - Janzen / @__Coos

10/07/2022 at 06:19AM

29
#39 - Topvimgolf Score / @topvimgolfscore

10/15/2022 at 10:05AM

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

11/08/2022 at 02:18PM

29
#41 - vuems / @vuems2win

11/12/2022 at 02:59PM

29
#42 - Lars Winderling / @kaHaleMaKai

11/30/2022 at 07:17PM

29
#43 - Michał / @Micha46184564

12/11/2022 at 04:04PM

29
#44 - 蛙爹 / @Joe53572723

02/21/2023 at 06:12AM

29
#45 - 黄高昂 / @suewiq

03/02/2023 at 02:56AM

29
#46 - FirstModus / @Nolimimer

04/08/2023 at 09:51PM

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

07/04/2023 at 01:00PM

29
#48 - moh ayaya / @AyayaMoh

08/20/2023 at 01:40PM

29
#49 - naka / @nak38223985244

09/03/2023 at 08:47AM

29
#50 - Monkey Boy / @monkey29089

09/23/2023 at 05:32AM

29
#51 - Geoff Liu / @geoff_liu

09/23/2023 at 09:51PM

29
#52 - Philipp Schilk / @philipp_schilk

09/30/2023 at 03:56PM

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

10/15/2023 at 09:14AM

29
#54 - scpchicken / @scpchick

10/17/2023 at 07:12PM

29
#55 - Laurens De la Marche / @LaurensDLM

10/18/2023 at 11:38AM

29
#56 - Luoyb / @Luoyb

10/21/2023 at 05:09AM

29
#57 - tien / @tien40766111

11/13/2023 at 12:20PM

29
#58 - Leon Katsnelson / @leonkatsnelson

12/15/2023 at 08:10PM

29
#59 - MonkieeBoi / @MonkieeBoi

01/02/2024 at 05:41AM

29
#60 - jaggujajamensan / @jaggujajamensan

02/12/2024 at 12:45PM