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):
29
#61 - Berel94 / @Berel94

03/05/2024 at 06:45PM

29
#62 - Lennart / @lennartack

04/26/2024 at 01:54PM

29
#63 - Aly Thobani / @alythobani

05/23/2024 at 01:54AM

29
#64 - Peppa Pig / @PeppaPigSg

05/31/2024 at 04:15AM

29
#65 - lnorbo / @lnorbo

06/07/2024 at 08:02PM

30
#66 - trafficone / @trafficone

05/03/2022 at 03:21PM

30
#67 - Monti L / @MT_Lai

05/26/2022 at 01:20PM

30
#68 - satetheus-vimgolf / @SVimgolf

07/23/2022 at 08:54PM

30
#69 - jimmarq / @jimmarq

10/28/2022 at 01:58PM

30
#70 - ky05uk3 / @kyo89347563

11/23/2022 at 02:28AM

30
#71 - Francois Marais / @maraisf

09/30/2023 at 09:18AM

31
#72 - hamb / @hamb88140219

03/26/2022 at 07:20PM

31
#73 - rnakai / @rnakai_42

03/28/2022 at 07:37AM

31
#74 - Arjan Verkerk / @adverkerk

03/30/2022 at 03:10PM

31
#75 - Brian Leung / @brian_leung

04/17/2022 at 02:44AM

33
#76 - Camille 🌷 / @StupideCamille

03/24/2022 at 09:53PM

34
#77 - Branimir Mirčetić / @BranimirMireti1

04/10/2022 at 11:38PM

34
#78 - Johnnie Walker / @Johnnie11414500

04/11/2022 at 01:23PM

34
#79 - Mika Dede / @xerv0n

09/02/2022 at 05:40AM

34
#80 - MC / @MC88686523

12/08/2022 at 03:21AM

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

08/03/2022 at 02:37AM

36
#82 - Lisa Ugray / @lisa_ugray

03/24/2022 at 03:37PM

36
#83 - laityjet / @laityjet1

05/08/2022 at 10:41AM

36
#84 - tk555 / @tk55513

05/03/2024 at 10:52AM

37
#85 - "Smylers" / @Smylers2

03/22/2022 at 02:17PM

37
#86 - Anthony Asp / @AnthonyAsp3

03/23/2022 at 07:29PM

37
#87 - Dan / @dstein64

04/05/2022 at 04:14PM

37
#88 - ._. / @Katharsic

04/23/2022 at 03:45PM

37
#89 - xadrta / @xadrta

05/09/2022 at 06:58PM

37
#90 - c3b277c3b3 / @c3b277c3b3

05/16/2022 at 12:41PM