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

251 active golfers, 1190 entries

Leaderboard (lowest score wins):
52
#181 - Adam Tajti / @Devilirium

04/23/2022 at 07:15PM

52
#182 - herbage / @herbage2

04/30/2022 at 04:16AM

52
#183 - (ノ◕ヮ◕)ノ*:・゚✧ / @Mebazaa

07/02/2022 at 03:09PM

52
#184 - Nathan Iszlaub / @NIszlaub

10/21/2022 at 05:40PM

53
#185 - Aiden Yang / @aidenyangnn

03/22/2022 at 07:59AM

53
#186 - Nougatine Naja / @NougatineNaja

03/25/2022 at 01:14PM

53
#187 - Andreas Aumann / @andreasaumann

03/27/2022 at 03:08PM

53
#188 - Daniel Qu / @danielq9871

05/20/2022 at 06:59PM

53
#189 - electronjunkie / @electronjunkie

07/06/2022 at 09:32PM

53
#190 - owner / @owner87643936

04/24/2023 at 07:23PM

53
#191 - user113333 / @user113333

05/13/2024 at 01:36PM

54
#192 - two failing clusters in a trench coat / @0x12b

04/05/2022 at 08:54PM

54
#193 - タケ / @Take3832

04/23/2022 at 03:07PM

54
#194 - Janith Petangoda / @janithpet

08/16/2022 at 10:09PM

55
#195 - 'Dr' Joe Reddington / @JoeReddington

03/31/2022 at 10:20AM

55
#196 - ff df / @ffdf93207177

04/18/2022 at 01:35AM

55
#197 - David Tchanturia / @daviti85142401

05/14/2022 at 03:37PM

55
#198 - Vinay Sridhar / @kewllip

03/20/2023 at 09:50AM

56
#199 - Cpt Mitten / @CptMitten

03/31/2022 at 02:32PM

56
#200 - Curtis Ault / @Curtis_Ault

04/01/2022 at 08:35PM

56
#201 - João Carvalho / @joaoCarvas

11/28/2022 at 02:14PM

56
#202 - Daniel Nettelfield / @DNIIBOY

12/11/2022 at 08:54PM

56
#203 - Erick Gonzalez / @eygl_erick

06/23/2023 at 01:41AM

58
#204 - kulabun / @kulabun

09/28/2022 at 08:03AM

59
#205 - Zach Calhoun / @ZachDCalhoun

03/27/2022 at 11:24PM

59
#206 - dolfin1107 / @dolfin1107

07/27/2023 at 11:58PM

59
#207 - LandR / @ListenAndR

10/18/2023 at 08:43AM

60
#208 - salchint / @salchint

05/04/2022 at 10:45PM

60
#209 - Ilay Skutelsky / @ISkutelsky

08/01/2022 at 10:15PM

60
#210 - @grhkm@infosec.exchange / @grhkm21

12/20/2022 at 02:34PM