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

232 active golfers, 1090 entries

Leaderboard (lowest score wins):
38
#91 - b1gz / @_b1gz

07/11/2023 at 09:51PM

39
#92 - sapir malka / @sapir5522

05/01/2022 at 12:44PM

39
#93 - Mr Spoony / @MrKSpoon

06/09/2022 at 07:21PM

39
#94 - Ivo Blöchliger / @aigledesalpes

06/10/2022 at 07:46PM

40
#95 - jofene / @jofene2

05/06/2022 at 12:30PM

40
#96 - Iron Manders / @MandersIron

10/25/2022 at 07:34PM

41
#97 - Regan Tackett / @arrowtackett

05/19/2022 at 12:29AM

41
#98 - Martin Bielik / @mabielik

06/01/2022 at 02:46PM

41
#99 - Ariel Frischer / @ArielFrischer

07/13/2022 at 09:52AM

41
#100 - Andy Tockman / @atckmn

07/16/2022 at 02:08AM

41
#101 - Dr. Peťko / @PetkoDr

09/13/2022 at 04:56AM

41
#102 - fraktal / @FraktalRebirth

11/29/2022 at 07:25AM

41
#103 - Dank City / @ddankcity

12/04/2022 at 10:17PM

41
#104 - yurei / @yurei38667012

01/13/2023 at 12:46PM

41
#105 - Zhou Jiazheng / @ZhouJiazheng0

02/11/2023 at 02:15AM

42
#106 - James Duffy / @jduffy3

04/07/2022 at 11:42PM

42
#107 - Preston Pysh܁ᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠ / @Gordan6freeman

04/22/2022 at 10:59PM

42
#108 - Richard Liu / @Richard86090148

05/23/2022 at 03:56AM

42
#109 - Serhiy Prikhodko / @mastersnetru

09/22/2022 at 10:48AM

43
#110 - samsepiol / @samsepi81094451

04/01/2022 at 04:48PM

43
#111 - Jason Kuan | jasonkuan.eth / @Jason9075Kuan

04/03/2022 at 09:23AM

43
#112 - Andrew Morris / @andrew_morris

07/14/2022 at 02:58AM

43
#113 - Laughing Cavalier / @jovial_cavalier

10/26/2022 at 02:45PM

43
#114 - 马海洋 / @LG41bT7ZvqOdFl3

02/07/2023 at 04:45AM

43
#115 - e_e / @eleloi

02/10/2023 at 08:58PM

43
#116 - Иван / @wansmer

04/22/2023 at 10:28PM

43
#117 - Milan Blažek / @Somin13

09/05/2023 at 09:28PM

44
#118 - Pierre-Olivier Proulx / @PierreO57066096

04/18/2022 at 01:08AM

44
#119 - José Medrano / @happylilmexican

05/04/2022 at 03:56PM

44
#120 - Lanly / @1094916227

05/09/2022 at 03:14AM