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

260 active golfers, 1231 entries

Leaderboard (lowest score wins):
45
#151 - Sebastian Steenssøe / @VildMedPap

02/18/2024 at 11:23PM

46
#152 - James Casey / @hanavi

08/18/2022 at 01:57AM

46
#153 - Desentcare / @ashuyali

08/24/2022 at 09:33PM

46
#154 - MerryElvira / @ElviraBTC

09/24/2022 at 01:16PM

47
#155 - Nicolas Kreutzer / @NigiCereal

06/10/2022 at 08:08PM

47
#156 - Hugh / @deeoh22

12/08/2022 at 02:02PM

47
#157 - Ludovic Schwartz / @ludovicschwartz

11/20/2023 at 11:17AM

47
#158 - Namdrib / @Namdrib

07/21/2024 at 01:21PM

48
#159 - スティーン@ニーツ / @raxmur

04/21/2022 at 09:44AM

48
#160 - Ryan Murphy / @RyanMur03026891

05/03/2022 at 12:38PM

48
#161 - Eric Briand / @eric_briand

05/10/2022 at 02:20PM

48
#162 - Maurice Schmicking / @m_schmicking

11/22/2023 at 07:36AM

49
#163 - pusha t daily / @rudellius

04/08/2022 at 08:42AM

49
#164 - Fredrik Peteri / @Xeduses

04/10/2022 at 01:37PM

49
#165 - Lyren Brown / @LyrenBrown

05/01/2022 at 07:46AM

49
#166 - Justin Sane / @Here4Vimgolf

05/10/2022 at 06:40PM

49
#167 - ccorvi / @ccorvi1

05/16/2022 at 03:46PM

49
#168 - Adam Balawender / @a_balawender

05/18/2022 at 10:28PM

49
#169 - kjghf3f9xf2 / @kjghf3f9xf2

06/15/2022 at 04:03AM

49
#170 - Qther / @qtherlol

11/07/2022 at 12:57PM

49
#171 - James / @Dronak

12/15/2022 at 07:10PM

49
#172 - Arey125 / @Arey125

01/19/2024 at 09:17AM

50
#173 - Sithe / @SitheTie

05/05/2022 at 06:50PM

50
#174 - sdfghjk / @sdfghjk88424595

05/19/2022 at 11:28PM

50
#175 - redbigyesnoGoThenWhy / @redbigyesno

05/22/2022 at 05:59AM

50
#176 - YaruCar / @yaru_car

06/22/2022 at 11:12PM

50
#177 - usermod / @g_usermod

02/09/2023 at 07:50PM

50
#178 - Selvaganapathy P / @canabady

04/11/2023 at 10:21AM

50
#179 - samuel erlands / @ErlandsSam52210

08/22/2023 at 01:30PM

50
#180 - bonettimrc / @bonettimrc

04/24/2024 at 04:24PM