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 92 remaining solutions by signing in and submitting your own entry
#93 Dominic Z / @thammaaa - Score: 90 - 12/21/17 @ 09:10
<Down>w/><CR>i<Right><Right>$row[<Right><C-N>o<BS><BS><BS><BS><BS>n<C-H>n<C-N><Right>]<Esc>ni<Right><Right>$<C-N><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS>r<Tab><BS><C-N>[<Right><Right>]<Left><Left>ot<C-N><Down><Left><Left><Left>$row[<Right>cr<C-N><Right>]<Down><Left><Left>$row[<Right>up<C-N><Right>]<Esc>:x<CR>

0 comments


Created by: @oscarmlage

93 active golfers, 264 entries

Leaderboard (lowest score wins):
28
#61 - qwertyu / @qwertyu78679259

06/12/2018 at 04:43AM

28
#62 - 赤佐田奈葉 / @akasatanaha_

06/29/2018 at 08:24AM

28
#63 - Víctor López / @viticlick

08/22/2018 at 03:32PM

28
#64 - Ivo Blöchliger / @aigledesalpes

08/18/2019 at 08:27AM

28
#65 - RockerZZY / @rocker_zzy

06/20/2020 at 06:06AM

29
#66 - Luong Nguyen / @LuongNguyen_95

01/13/2018 at 03:50PM

29
#67 - Apox / @apox159

07/20/2018 at 08:39PM

29
#68 - Frank Korf / @OMGFrank

08/28/2018 at 07:53PM

30
#69 - Brian Hall / @_bruab_

12/15/2017 at 03:17PM

30
#70 - Martin Pedersen / @M4R7iNP

12/29/2017 at 01:56PM

30
#71 - Jonathan Camilleri / @Too_Many_Taken

05/27/2018 at 11:16AM

30
#72 - ikigai / @ikigai27357012

06/18/2018 at 12:03PM

31
#73 - Zyurs / @The_Zyurs

12/15/2017 at 02:03PM

31
#74 - Paul Jones / @thepauljones

06/25/2018 at 11:51AM

31
#75 - Akshay Aurora / @akshayaurora

02/12/2020 at 07:33PM

32
#76 - DQMSL対戦募集ツイートbot / @foronlinegamer

03/20/2018 at 07:17AM

32
#77 - Phoon / @justflashhim

05/11/2019 at 04:07PM

32
#78 - Mike Hourahine / @mhourahine

08/08/2019 at 03:06AM

33
#79 - Ahmed Hasan / @ahmedrhasan

12/25/2017 at 06:18PM

36
#80 - chaotic / @laersn

08/02/2018 at 01:37PM

37
#81 - Wolly Woodpecker / @WollyWoodpecker

01/01/2018 at 04:00PM

37
#82 - smile at humor / @pseuyi

02/12/2020 at 07:16PM

40
#83 - eric / @ericandrewlewis

12/15/2017 at 01:41PM

40
#84 - Mathieu Larouche / @matdube

12/15/2017 at 08:50PM

41
#85 - Miki Tebeka / @tebeka

12/15/2017 at 04:59AM

41
#86 - Mikael Axelsson / @Mikael_Axelsson

12/15/2017 at 06:48AM

41
#87 - Jurica / @Jurica34581259

11/16/2018 at 03:58PM

43
#88 - Bernhard Brunner / @13brunner

08/28/2018 at 07:45AM

44
#89 - allinonemovie / @allinonemovie

12/17/2017 at 05:28PM

44
#90 - Shunichi Kanade / @shunkana

12/12/2018 at 02:01PM