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):
23
#1 - Petro Тrouq / @zulolosi

12/28/2017 at 06:02PM

23
#2 - ParasamGateZero / @ParasamGateZero

01/17/2018 at 05:57AM

23
#3 - Oskar Fridell / @rax0m

02/02/2018 at 03:47PM

23
#4 - Bart Reynolds / @bartums

02/28/2018 at 02:54PM

23
#5 - GreenPinguin / @GreenPinguin2

03/14/2018 at 12:50PM

23
#6 - Lisa Ugray / @lisa_ugray

03/18/2018 at 01:03PM

23
#7 - c0llision / @sh3llcode

04/17/2018 at 08:52PM

23
#8 - Jay Knight ♞ / @jayknight

05/03/2018 at 05:00PM

23
#9 - platypusDancing / @platypusDancing

05/03/2018 at 07:11PM

23
#10 - Marcos Almeida / @almeidamarcos_

05/05/2018 at 05:49PM

23
#11 - towc / @MateiCopot

05/25/2018 at 07:04PM

23
#12 - Daniël De Koker / @daniel_koker

07/02/2018 at 08:06AM

23
#13 - heisenderp / @0xheisenderp

08/02/2018 at 12:23PM

23
#14 - fucus / @fishlovebanana

08/25/2018 at 01:58PM

23
#15 - name / @name65894813

11/23/2018 at 06:46PM

23
#16 - Tinko Minko / @tandikula

01/28/2019 at 12:47AM

23
#17 - Cassandra / @kascein

09/17/2019 at 10:57PM

23
#18 - Melvin Cheung / @MelvinCheung

11/12/2019 at 06:12PM

23
#19 - Miłosz Łakomy / @foobar01123

12/19/2019 at 05:13PM

23
#20 - Jung Yeon Park / @park_jungy

02/16/2021 at 11:16PM

23
#21 - hepebexè / @hepebexe

03/03/2021 at 06:40PM

23
#22 - treb / @treb03683130

03/11/2021 at 12:46PM

23
#23 - A A A / @37fatos

03/13/2021 at 02:14AM

23
#24 - Jean George / @JeanGeo20504212

01/03/2022 at 12:18PM

23
#25 - Janzen / @__Coos

10/04/2022 at 03:24AM

23
#26 - Luoyb / @Luoyb

11/15/2023 at 01:15AM

23
#27 - Don'tBeAlarmed / @DontBeAlarmed

05/29/2024 at 06:48PM

23
#28 - Peppa Pig / @PeppaPi95550250

07/01/2024 at 01:32AM

24
#29 - Smylers / @Smylers2

12/15/2017 at 12:59PM

24
#30 - John Braxler / @braxler

12/15/2017 at 02:17PM