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

271 active golfers, 1253 entries

Leaderboard (lowest score wins):
29
#1 - Jean George / @JeanGeo20504212

03/22/2022 at 12:24PM

29
#2 - John Braxler / @braxler

03/22/2022 at 03:16PM

29
#3 - Jon Krause / @jkrause314

03/22/2022 at 08:41PM

29
#4 - Oskar Fridell / @rax0m

03/23/2022 at 01:23PM

29
#5 - Pedro Minicz / @pedrominicz

03/25/2022 at 10:30PM

29
#6 - Ramtin Martin / @martin_ramtin

03/27/2022 at 02:28AM

29
#7 - dorianm / @dorianm

03/28/2022 at 03:39AM

29
#8 - h / @tgen22334

03/28/2022 at 08:48AM

29
#9 - Sammit / @somemeatjain

04/03/2022 at 01:56PM

29
#10 - Leo Winters / @LeoPWinters

04/03/2022 at 06:53PM

29
#11 - Richy Strnad / @RichardStrnad

04/05/2022 at 01:21PM

29
#12 - Igor Sowinski / @SowinskiIgor

04/05/2022 at 10:41PM

29
#13 - John Xu / @xzzhiao

04/06/2022 at 12:37AM

29
#14 - Daniel Harding / @living_180

04/14/2022 at 10:10AM

29
#15 - Tom11w / @Tom11Wh

04/22/2022 at 04:29PM

29
#16 - Youssef Magdy / @youssef_magdy29

04/27/2022 at 10:16PM

29
#17 - Eviber / @youvaaaaa

05/02/2022 at 01:06PM

29
#18 - Marc Jethro Avila / @maje_avila

05/07/2022 at 10:49AM

29
#19 - Pablo Cárdenas / @pablo_cardenasb

05/07/2022 at 04:25PM

29
#20 - quemeraisc / @quemeraisc

05/11/2022 at 12:53PM

29
#21 - Irakli Chigvaria / @tchigvaria

05/18/2022 at 02:03PM

29
#22 - russellzhaomao / @russellzhaomao

05/19/2022 at 04:36AM

29
#23 - jcbglbmn / @JacobGelbman

05/20/2022 at 07:39PM

29
#24 - Calum Smith / @cpmsmith

05/27/2022 at 06:17PM

29
#25 - ShookerAndBeta / @Shooker2012

06/02/2022 at 07:13AM

29
#26 - Luke Korn / @LukeKorn

06/05/2022 at 10:22AM

29
#27 - Ekalos / @_Ekalos

06/11/2022 at 09:08AM

29
#28 - YE / @DeracanthaOnos

06/17/2022 at 03:44AM

29
#29 - Dmitry Antonyuk / @dantonuke

07/07/2022 at 06:11PM

29
#30 - Lory / @Lory46845742

07/23/2022 at 06:48AM