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 76 remaining solutions by signing in and submitting your own entry
#77 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

77 active golfers, 206 entries

Leaderboard (lowest score wins):
30
#61 - ikigai / @ikigai27357012

06/18/2018 at 12:03PM

31
#62 - Zyurs / @The_Zyurs

12/15/2017 at 02:03PM

31
#63 - Paul Jones / @thepauljones

06/25/2018 at 11:51AM

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

03/20/2018 at 07:17AM

33
#65 - Ahmed Hasan / @microbialwalrus

12/25/2017 at 06:18PM

36
#66 - chaotic / @laersn

08/02/2018 at 01:37PM

37
#67 - Wolly Woodpecker / @WollyWoodpecker

01/01/2018 at 04:00PM

40
#68 - eric / @ericandrewlewis

12/15/2017 at 01:41PM

40
#69 - Mathieu Larouche / @matdube

12/15/2017 at 08:50PM

41
#70 - Miki Tebeka / @tebeka

12/15/2017 at 04:59AM

41
#71 - Mikael Axelsson / @Mikael_Axelsson

12/15/2017 at 06:48AM

41
#72 - Jurica / @Jurica34581259

11/16/2018 at 03:58PM

43
#73 - Bernhard Brunner / @13brunner

08/28/2018 at 07:45AM

44
#74 - allinonemovie / @allinonemovie

12/17/2017 at 05:28PM

61
#75 - Guillaume Seren / @guillaumeseren

04/18/2018 at 07:49AM

74
#76 - BitLad / @BitLad

01/31/2018 at 03:40PM

90
#77 - Dominic Z / @thammaaa

12/21/2017 at 09:10AM