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):
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

30
#43 - trafficone / @trafficone

05/03/2022 at 03:21PM

30
#44 - Monti L / @MT_Lai

05/26/2022 at 01:20PM

30
#45 - satetheus-vimgolf / @SVimgolf

07/23/2022 at 08:54PM

30
#46 - jimmarq / @jimmarq

10/28/2022 at 01:58PM

30
#47 - ky05uk3 / @kyo89347563

11/23/2022 at 02:28AM

31
#48 - hamb / @hamb88140219

03/26/2022 at 07:20PM

31
#49 - rnakai / @rnakai_42

03/28/2022 at 07:37AM

31
#50 - Arjan Verkerk / @adverkerk

03/30/2022 at 03:10PM

31
#51 - Brian Leung / @brian_leung

04/17/2022 at 02:44AM

33
#52 - Camille 🌷 / @StupideCamille

03/24/2022 at 09:53PM

34
#53 - Branimir Mirčetić / @BranimirMireti1

04/10/2022 at 11:38PM

34
#54 - Johnnie Walker / @Johnnie11414500

04/11/2022 at 01:23PM

34
#55 - Mika Dede / @xerv0n

09/02/2022 at 05:40AM

35
#56 - Александр Черенков / @AleksandrCeren3

08/03/2022 at 02:37AM

36
#57 - Lisa Ugray / @lisa_ugray

03/24/2022 at 03:37PM

36
#58 - laityjet / @laityjet1

05/08/2022 at 10:41AM

37
#59 - Smylers / @Smylers2

03/22/2022 at 02:17PM

37
#60 - Anthony Asp / @AnthonyAsp3

03/23/2022 at 07:29PM