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):
25
#31 - BareTull / @BareTull3

12/18/2017 at 04:45PM

25
#32 - Mateen Ulhaq / @sicariusnoctis

06/10/2018 at 03:04AM

25
#33 - Norbert / @mullno

07/06/2018 at 06:33PM

26
#34 - tPenguinLTG / @tpenguinltg

12/15/2017 at 06:02AM

26
#35 - AleksandarTrifunovic / @akstrfn

12/15/2017 at 08:34AM

26
#36 - Lajos Koszti / @Ajnasz

12/15/2017 at 11:11AM

26
#37 - Mike Harris / @MikeMJHarris

12/19/2017 at 12:20PM

26
#38 - Camillott Games / @camillottgames

04/18/2018 at 11:18PM

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

12/17/2017 at 02:58AM

27
#40 - mnx / @mnxx

01/04/2018 at 10:45AM

28
#41 - h43z / @h43z

12/15/2017 at 03:03PM

28
#42 - Henrique Malheiro / @rike09

12/15/2017 at 10:22PM

28
#43 - Bob Johnson / @BobJohn72127595

12/19/2017 at 09:04AM

28
#44 - 小山内まい / @osanamity

12/23/2017 at 06:24PM

28
#45 - あっつぉ / @tadokorohitoshi

12/26/2017 at 02:58AM

28
#46 - Blake Tereau / @BlakeTereau

01/12/2018 at 03:46PM

28
#47 - Rah'tol Samok🖖 / @ralokt

01/23/2018 at 10:14AM

28
#48 - Walter McLallen / @wmclallen

02/02/2018 at 01:15AM

28
#49 - Dennis Burke / @ikirudennis

02/03/2018 at 04:47PM

28
#50 - Arijus / @argshook

02/09/2018 at 09:34AM

28
#51 - 石奕心 / @allenshih1

06/07/2018 at 03:38AM

28
#52 - qwertyu / @qwertyu78679259

06/12/2018 at 04:43AM

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

06/29/2018 at 08:24AM

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

08/22/2018 at 03:32PM

29
#55 - Luong Nguyen / @LuongNguyen_95

01/13/2018 at 03:50PM

29
#56 - Apox / @apox159

07/20/2018 at 08:39PM

29
#57 - Frank Korf / @OMGFrank

08/28/2018 at 07:53PM

30
#58 - Brian Hall / @_bruab_

12/15/2017 at 03:17PM

30
#59 - Martin Pedersen / @M4R7iNP

12/29/2017 at 01:56PM

30
#60 - Jonathan Camilleri / @Too_Many_Taken

05/27/2018 at 11:16AM