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

271 active golfers, 1253 entries

Leaderboard (lowest score wins):
55
#211 - Ben Gadbois / @bengadbois

08/09/2024 at 10:59PM

56
#212 - Cpt Mitten / @CptMitten

03/31/2022 at 02:32PM

56
#213 - Curtis Ault / @Curtis_Ault

04/01/2022 at 08:35PM

56
#214 - João Carvalho / @joaoCarvas

11/28/2022 at 02:14PM

56
#215 - Daniel Nettelfield / @DNIIBOY

12/11/2022 at 08:54PM

56
#216 - Erick Gonzalez / @eygl_erick

06/23/2023 at 01:41AM

56
#217 - Alex Khakhlyuk / @khakhlyuk

08/26/2024 at 07:37PM

58
#218 - kulabun / @kulabun

09/28/2022 at 08:03AM

59
#219 - Zach Calhoun / @ZachDCalhoun

03/27/2022 at 11:24PM

59
#220 - dolfin1107 / @dolfin1107

07/27/2023 at 11:58PM

59
#221 - LandR / @ListenAndR

10/18/2023 at 08:43AM

60
#222 - salchint / @salchint

05/04/2022 at 10:45PM

60
#223 - Ilay Skutelsky / @ISkutelsky

08/01/2022 at 10:15PM

60
#224 - @grhkm@infosec.exchange / @grhkm21

12/20/2022 at 02:34PM

60
#225 - Aaron Hunt / @ach5910

09/28/2023 at 07:51PM

61
#226 - Raimondas Kazlauskas / @RhymondK

03/29/2022 at 11:15AM

61
#227 - August Sunday / @aoa_sundays

04/13/2022 at 03:11AM

61
#228 - ohwell / @KiranClose

07/30/2022 at 03:23PM

62
#229 - anonymouse / @anonymo65837183

04/02/2022 at 09:14PM

62
#230 - Benjamin McCown / @beanmccown

04/06/2022 at 10:19PM

62
#231 - tuck / @19emtuck

04/13/2022 at 09:55AM

62
#232 - Ragtime / @TheRagtimeBlues

05/21/2022 at 05:06AM

62
#233 - Sergio / @SergioVl12

04/22/2023 at 09:52AM

63
#234 - dahan choi / @chedaahh

01/16/2023 at 09:47AM

64
#235 - Van / @dangtrivan15

09/10/2022 at 09:39AM

64
#236 - riandrake / @riandrake

02/06/2024 at 09:03PM

64
#237 - dennis / @nagolove

04/25/2024 at 12:40PM

65
#238 - Enrique Santana / @esantanaya

04/24/2022 at 01:09AM

66
#239 - Nanne Wielinga / @NanneWielinga

07/26/2022 at 07:35AM

66
#240 - 语冰者 / @darcysail

09/20/2022 at 02:27AM