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 5a33022f2de3f1021300000d

Array propagate

Complete the array with the keys as part of the value

Start file
$arr = [
   
'one_option' => '',
   
'other' => '',
   
'created_at' => '',
   
'updated_at' => ''
]
End file
$arr = [
   
'one_option' => $row['one_option'],
   
'other' => $row['other'],
   
'created_at' => $row['created_at'],
   
'updated_at' => $row['updated_at']
]

View Diff

2,6c2,6
<     'one_option' => '',
<     'other' => '',
<     'created_at' => '',
<     'updated_at' => ''
< ]
\ No newline at end of file
---
>     'one_option' => $row['one_option'],
>     'other' => $row['other'],
>     'created_at' => $row['created_at'],
>     'updated_at' => $row['updated_at']
> ]

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 118 remaining solutions by signing in and submitting your own entry
#119 leo / @leo93755786 - Score: 100 - 08/27/20 @ 12:33
7wwi$row[<Esc>bb2yw<Down>b<Left>p<Down><Right>p<Down>b<Left>p<Right>i[<Right><Right>]<Up><Left>]<Left><Left><Left>[<Up><Left>]<Left><Left><Left>[<Up><Right><Right><Right><Right><Right><Right><Right>]<Esc>bbbbbbyw4wwwb<Right>p3wyw6wb<Right>p3wyw5w<Right>p3wyw5w<Right>p:wq<CR>

0 comments


Created by: @oscarmlage

119 active golfers, 338 entries

Leaderboard (lowest score wins):
24
#31 - Jon Krause / @jkrause314

12/15/2017 at 03:34PM

24
#32 - Sage san / @sagesancast

12/17/2017 at 08:15PM

24
#33 - Saki Gw / @Sakigw

12/19/2017 at 02:00PM

24
#34 - deepak / @utopianmonk

12/22/2017 at 10:01AM

24
#35 - BarbaJol / @drpproteus

12/30/2017 at 05:29PM

24
#36 - 梧桐王子 / @WutongYujie

01/05/2018 at 03:38AM

24
#37 - Alphonse Mariya / @alfunx

01/08/2018 at 10:13PM

24
#38 - Семён Марьясин / @MaryasinS

01/12/2018 at 11:30AM

24
#39 - Lifepillar / @lifepillar

05/10/2018 at 07:01PM

24
#40 - fsj / @FrogzSJ

08/12/2018 at 06:14PM

24
#41 - Dax / @zacoxi

11/16/2018 at 06:49AM

24
#42 - alekfed / @alek_fed

04/15/2019 at 08:13PM

24
#43 - majo senf / @majo_senf

06/21/2019 at 12:57PM

24
#44 - Lory / @Lory46845742

11/20/2019 at 01:49PM

24
#45 - yancy / @yancy_dong

09/29/2021 at 07:31AM

25
#46 - Jan Bundesmann / @janbundesmann

12/15/2017 at 11:17AM

25
#47 - Bradley M. Small / @BradleySmall

12/15/2017 at 11:51AM

25
#48 - gink / @anagiwa

12/18/2017 at 07:58AM

25
#49 - BareTull / @BareTull3

12/18/2017 at 04:45PM

25
#50 - Mateen Ulhaq / @sicariusnoctis

06/10/2018 at 03:04AM

25
#51 - Norbert / @mullno

07/06/2018 at 06:33PM

25
#52 - Mihai / @mihaicristiant

12/21/2018 at 11:57AM

25
#53 - rappenstein2 / @rappenstein2

01/15/2022 at 08:13PM

26
#54 - tPenguinLTG / @tpenguinltg

12/15/2017 at 06:02AM

26
#55 - AleksandarTrifunovic / @akstrfn

12/15/2017 at 08:34AM

26
#56 - Lajos Koszti / @Ajnasz

12/15/2017 at 11:11AM

26
#57 - Mike Harris / @MikeMJHarris

12/19/2017 at 12:20PM

26
#58 - Camillott Games / @camillottgames

04/18/2018 at 11:18PM

26
#59 - POSIX / @po6ix

01/10/2022 at 09:15AM

27
#60 - Михаил Сурин / @realssmike

12/17/2017 at 02:58AM