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):
50
#181 - YaruCar / @yaru_car

06/22/2022 at 11:12PM

50
#182 - usermod / @g_usermod

02/09/2023 at 07:50PM

50
#183 - Selvaganapathy P / @canabady

04/11/2023 at 10:21AM

50
#184 - samuel erlands / @ErlandsSam52210

08/22/2023 at 01:30PM

50
#185 - bonettimrc / @bonettimrc

04/24/2024 at 04:24PM

51
#186 - fhfuih / @samhzy

05/23/2022 at 04:31AM

51
#187 - Abdelrahman Madkour / @A3Madkour

08/18/2022 at 06:14PM

51
#188 - sap / @sap38838304

09/23/2022 at 07:33PM

51
#189 - ilyas / @Ahaaah2071

09/17/2023 at 09:26PM

52
#190 - free ye / @ye1083369199

04/17/2022 at 11:51AM

52
#191 - Adam Tajti / @Devilirium

04/23/2022 at 07:15PM

52
#192 - herbage / @herbage2

04/30/2022 at 04:16AM

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

07/02/2022 at 03:09PM

52
#194 - Nathan Iszlaub / @NIszlaub

10/21/2022 at 05:40PM

52
#195 - e.cousinet / @ecousinet

07/18/2024 at 09:52AM

53
#196 - Aiden Yang / @aidenyangnn

03/22/2022 at 07:59AM

53
#197 - Nougatine Naja / @NougatineNaja

03/25/2022 at 01:14PM

53
#198 - Andreas Aumann / @andreasaumann

03/27/2022 at 03:08PM

53
#199 - Daniel Qu / @danielq9871

05/20/2022 at 06:59PM

53
#200 - electronjunkie / @electronjunkie

07/06/2022 at 09:32PM

53
#201 - owner / @owner87643936

04/24/2023 at 07:23PM

53
#202 - user113333 / @user113333

05/13/2024 at 01:36PM

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

04/05/2022 at 08:54PM

54
#204 - タケ / @Take3832

04/23/2022 at 03:07PM

54
#205 - Janith Petangoda / @janithpet

08/16/2022 at 10:09PM

54
#206 - ecerami / @ecerami

07/08/2024 at 01:25AM

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

03/31/2022 at 10:20AM

55
#208 - ff df / @ffdf93207177

04/18/2022 at 01:35AM

55
#209 - David Tchanturia / @daviti85142401

05/14/2022 at 03:37PM

55
#210 - Vinay Sridhar / @kewllip

03/20/2023 at 09:50AM