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 96 remaining solutions by signing in and submitting your own entry
#97 วทททท / @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


#98 nickGPT / @nickandbro - Score: 351 - 08/24/24 @ 03:08
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

98 active golfers, 316 entries

Leaderboard (lowest score wins):
59
#61 - Dmitry Antonyuk / @dm_antonyuk

08/24/2021 at 05:14PM

59
#62 - deusthe / @deusthe91

12/20/2021 at 09:41PM

59
#63 - jaggujajamensan / @jaggujajamensan

02/12/2024 at 11:12AM

60
#64 - e1mnos / @e1mnos

08/12/2021 at 01:57PM

60
#65 - 小世界 / @walilav

10/27/2023 at 03:57AM

61
#66 - Ethan Rietz / @EthanRietz

07/23/2021 at 07:56PM

62
#67 - ever0de / @ever0de

06/04/2021 at 01:52AM

64
#68 - Jemma / @Fwippy

06/28/2021 at 06:06PM

64
#69 - 으앙 / @meri2727

10/14/2023 at 06:44AM

65
#70 - ToofanJohn / @ToofanJohn

03/14/2022 at 04:53AM

65
#71 - KP / @KPatr1ck

11/07/2023 at 04:17AM

66
#72 - Ventura / @vetu11

05/12/2021 at 03:40PM

66
#73 - 44 / @e__oioi

05/22/2021 at 12:40PM

66
#74 - François / @mortyZZ

07/26/2021 at 07:23PM

66
#75 - Jonathan Gin / @jonathangin52

09/30/2022 at 04:32AM

69
#76 - Marcus / @marcusostling94

06/10/2021 at 07:56PM

69
#77 - Duy nguyễn / @Duycld03

07/27/2023 at 07:28PM

70
#78 - pu๊b / @rtapayahc

03/02/2022 at 03:56PM

70
#79 - Даня Ефимов / @Abberatus

03/13/2022 at 09:25PM

71
#80 - ­김수현 / 학생 / 건설환경공학부 / @gimsuhyeonhags1

03/24/2023 at 02:06AM

73
#81 - Aarya / @aaryabhatia6

07/15/2022 at 03:34AM

74
#82 - 深窓の令嬢@ドクター / @arbino1031

02/27/2022 at 11:17AM

75
#83 - Preston Pysh܁ᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠ / @Gordan6freeman

04/22/2022 at 02:02PM

75
#84 - Angel Juarez / @AngelWebDevy

05/23/2023 at 05:44AM

76
#85 - mika / @mika31120321

07/30/2022 at 11:18AM

78
#86 - pankace / @pankace_Frosted

03/02/2022 at 07:44PM

81
#87 - fff / @fff51460170

02/20/2021 at 03:33PM

91
#88 - :wq / @write_quit_22

05/18/2021 at 05:14PM

93
#89 - Un Extraño / @link145m

07/30/2021 at 02:52PM

93
#90 - @grhkm@infosec.exchange / @grhkm21

12/20/2022 at 11:09AM