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 15 remaining solutions by signing in and submitting your own entry
#16 fff / @fff51460170 - Score: 81 - 02/20/21 @ 15:33
YpdtxA<BS><BS><Esc>0i    <Esc>qa0wyt,iself.<Esc>f,i = <Esc>pf,df i<CR><Esc>q12@aiself.<Esc><Right>ywA = <Esc>p<Up><Up>A <Esc>4kA <Esc>:wq<CR>

0 comments


Created by: @BiddulphCaleb

16 active golfers, 43 entries

Leaderboard (lowest score wins):
38
#1 - Jon Krause / @jkrause314

02/04/2021 at 08:18PM

38
#2 - A A A / @37fatos

02/04/2021 at 08:40PM

38
#3 - John Braxler / @braxler

02/05/2021 at 03:54PM

38
#4 - Duncan / @Duncan31503119

02/07/2021 at 03:19AM

38
#5 - hamb / @hamb88140219

02/25/2021 at 08:11PM

38
#6 - der tanzbaer / @der_tanzbaer

03/10/2021 at 10:47PM

44
#7 - AAbraxas / @AAbraxas1

02/04/2021 at 08:36PM

45
#8 - Blake Tereau / @BlakeTereau

02/07/2021 at 11:35PM

45
#9 - Martin LOUAZEL / @Zbrahark

02/24/2021 at 08:30AM

46
#10 - Chris Conte / @chriscconte

02/11/2021 at 02:04AM

47
#11 - Smylers / @Smylers2

02/04/2021 at 09:33AM

48
#12 - Paul Inc / @hiniol1982

02/05/2021 at 07:42PM

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

03/18/2021 at 02:40PM

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

02/03/2021 at 01:54PM

54
#15 - syuusaku / @GSyuusaku

02/20/2021 at 11:31AM

81
#16 - fff / @fff51460170

02/20/2021 at 03:33PM