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 6019f1c4642668000cee11e8

Generate a very basic Python constructor

I actually needed to do this myself, so I look forward to learning how.

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 84 remaining solutions by signing in and submitting your own entry
#85 วทททท / @uhTOWreLzQy0JN5 - Score: 351 - 03/02/22 @ 14:18
o<BS>    self.<Esc>yy12p<CR>$<Up><Up>i<Right>x = x<Down>y = y<Down>z = z<Down>rotation<Esc>yiw$i <BS><Right> = <Esc>p<Down>i<Right>color = oo<BS><BS>color<Down>bounciness<Esc>yiw$i<Right> = <Esc>p<Down>i<Right>walking_speed <BS><Esc>yiw$i<Right> = <Esc>p<Down>i<Right>running_speed <BS> = <BS><BS><BS><Esc>yiw$i =<BS><BS><Right> =<Esc>i<Right> <Esc>pi<Up><Right> <Down><Down>health<Esc>yiw$i<Right> = <Esc>p<Down>i<Right>defenc<BS>se<Esc>yiw$i<Right> = `<Esc>pbi<BS><Down>age=<BS> = age <Down>type1 = type1<Down>type2 = type2<Esc>cccccbbjeuetgrgluehidbfnutdfujvcfnilfnubhigb<CR>dd<BS><BS><Esc>ddddoself.type2 = type2<Esc>:wq<CR>

0 comments


Created by: @BiddulphCaleb

85 active golfers, 292 entries

Leaderboard (lowest score wins):
45
#31 - Martin LOUAZEL / @Zbrahark

02/24/2021 at 08:30AM

45
#32 - Winnie Yeung / @vionwinnie

07/02/2021 at 01:27AM

45
#33 - Hossein Yousefi 💙 / @u_hossein

03/03/2022 at 02:53AM

45
#34 - Alex / @AlexanderHeatl2

07/26/2022 at 09:33PM

46
#35 - Chris Conte / @chriscconte

02/11/2021 at 02:04AM

46
#36 - A White Dwarf / @AWhiteDwarf1

06/28/2021 at 06:09PM

47
#37 - Smylers / @Smylers2

02/04/2021 at 09:33AM

47
#38 - Bspammer / @Bspammer

08/15/2021 at 02:39PM

48
#39 - Paul Inc / @hiniol1982

02/05/2021 at 07:42PM

49
#40 - grsh / @girish_i_am

05/23/2021 at 12:00PM

50
#41 - Daniel Qu / @danielq9871

05/10/2021 at 04:47PM

50
#42 - Vahan / @Vahan00900245

10/06/2021 at 03:17PM

52
#43 - Eric Söderström / @eksoderstrom

03/18/2021 at 02:40PM

53
#44 - philip / @philip5530

03/03/2022 at 02:46AM

53
#45 - James Hayden / @don_jaime

10/22/2022 at 05:34AM

54
#46 - Jonáš Šerých / @serycjon

02/03/2021 at 01:54PM

54
#47 - syuusaku / @GSyuusaku

02/20/2021 at 11:31AM

54
#48 - huscarl / @huscarl6

05/20/2021 at 04:38AM

54
#49 - Arjan Verkerk / @adverkerk

03/30/2022 at 08:47AM

55
#50 - Michael / @triorph

11/10/2021 at 07:38AM

56
#51 - rappenstein2 / @rappenstein2

01/13/2022 at 10:36PM

56
#52 - JVIM / @JVIM101

02/22/2022 at 12:39PM

57
#53 - idontwantaaccount / @fkURaccounts

11/30/2022 at 05:31PM

58
#54 - simplelife2010 / @simplelife20101

05/13/2021 at 12:26PM

59
#55 - Dmitry Antonyuk / @dm_antonyuk

08/24/2021 at 05:14PM

59
#56 - deusthe / @deusthe91

12/20/2021 at 09:41PM

60
#57 - e1mnos / @e1mnos

08/12/2021 at 01:57PM

61
#58 - Ethan Rietz / @EthanRietz

07/23/2021 at 07:56PM

62
#59 - ever0de / @ever0de

06/04/2021 at 01:52AM

64
#60 - Jemma / @Fwippy

06/28/2021 at 06:06PM