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 218 remaining solutions by signing in and submitting your own entry
#219 铃舟 / @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: @TheSchilk

219 active golfers, 995 entries

Leaderboard (lowest score wins):
34
#61 - Johnnie Walker / @Johnnie11414500

04/11/2022 at 01:23PM

34
#62 - Mika Dede / @xerv0n

09/02/2022 at 05:40AM

34
#63 - MC / @MC88686523

12/08/2022 at 03:21AM

35
#64 - Александр Черенков / @AleksandrCeren3

08/03/2022 at 02:37AM

36
#65 - Lisa Ugray / @lisa_ugray

03/24/2022 at 03:37PM

36
#66 - laityjet / @laityjet1

05/08/2022 at 10:41AM

37
#67 - Smylers / @Smylers2

03/22/2022 at 02:17PM

37
#68 - Anthony Asp / @AnthonyAsp3

03/23/2022 at 07:29PM

37
#69 - Dan / @dstein64

04/05/2022 at 04:14PM

37
#70 - ._. / @Katharsic

04/23/2022 at 03:45PM

37
#71 - xadrta / @xadrta

05/09/2022 at 06:58PM

37
#72 - c3b277c3b3 / @c3b277c3b3

05/16/2022 at 12:41PM

37
#73 - Robberechts Arne / @ArneRobberechts

05/21/2022 at 03:49PM

37
#74 - Will Long / @WillLon30283972

06/17/2022 at 04:29AM

37
#75 - Alex Lewin / @_AlexLewin

07/11/2022 at 10:40PM

37
#76 - brett / @brettyukich

07/14/2022 at 08:01AM

37
#77 - nauj / @nauj_w

07/30/2022 at 03:44AM

38
#78 - A White Dwarf / @AWhiteDwarf1

06/01/2022 at 08:06PM

38
#79 - Ratkovszki István / @RatkovszkiIstvn

09/08/2022 at 01:56PM

38
#80 - Mrmclarrinson / @mrmclarrinson

12/10/2022 at 11:27PM

38
#81 - b1gz / @_b1gz

07/11/2023 at 09:51PM

39
#82 - sapir malka / @sapir5522

05/01/2022 at 12:44PM

39
#83 - Mr Spoony / @MrKSpoon

06/09/2022 at 07:21PM

39
#84 - Ivo Blöchliger / @aigledesalpes

06/10/2022 at 07:46PM

40
#85 - jofene / @jofene2

05/06/2022 at 12:30PM

40
#86 - Iron Manders / @MandersIron

10/25/2022 at 07:34PM

41
#87 - Regan Tackett / @arrowtackett

05/19/2022 at 12:29AM

41
#88 - Martin Bielik / @mabielik

06/01/2022 at 02:46PM

41
#89 - Ariel Frischer / @ArielFrischer

07/13/2022 at 09:52AM

41
#90 - Andy Tockman / @atckmn

07/16/2022 at 02:08AM