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):
31
#91 - Paul Jones / @thepauljones

06/25/2018 at 11:51AM

31
#92 - Akshay Aurora / @akshayaurora

02/12/2020 at 07:33PM

31
#93 - Rehpotsirhc / @Rehpotsirhc-z

08/26/2024 at 02:51AM

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

03/20/2018 at 07:17AM

32
#95 - Phoon / @justflashhim

05/11/2019 at 04:07PM

32
#96 - Mike Hourahine / @mhourahine

08/08/2019 at 03:06AM

33
#97 - Ahmed Hasan / @ahmedrhasan

12/25/2017 at 06:18PM

33
#98 - Doemae / @Doemae02

08/31/2020 at 01:24PM

36
#99 - chaotic / @laersn

08/02/2018 at 01:37PM

37
#100 - Wolly Woodpecker / @WollyWoodpecker

01/01/2018 at 04:00PM

37
#101 - smile at humor / @pseuyi

02/12/2020 at 07:16PM

38
#102 - Miaomiao@.dandan / @Miaomiao_dandan

01/24/2022 at 08:18AM

40
#103 - eric / @ericandrewlewis

12/15/2017 at 01:41PM

40
#104 - Mathieu Larouche / @matdube

12/15/2017 at 08:50PM

41
#105 - Miki Tebeka / @tebeka

12/15/2017 at 04:59AM

41
#106 - Mikael Axelsson / @Mikael_Axelsson

12/15/2017 at 06:48AM

41
#107 - Jurica / @Jurica34581259

11/16/2018 at 03:58PM

42
#108 - Kha Nguyen / @__ngtrongkha

02/25/2021 at 05:10AM

43
#109 - Bernhard Brunner / @13brunner

08/28/2018 at 07:45AM

44
#110 - allinonemovie / @allinonemovie

12/17/2017 at 05:28PM

44
#111 - Shunichi Kanade / @shunkana

12/12/2018 at 02:01PM

52
#112 - Jiawei Li / @calvin_lee2

01/24/2022 at 06:11AM

61
#113 - Guillaume Seren / @guillaumeseren

04/18/2018 at 07:49AM

74
#114 - BitLad / @BitLad

01/31/2018 at 03:40PM

77
#115 - Rennnda / @rennnda2020

04/28/2021 at 04:50PM

77
#116 - nickGPT / @nickandbro

08/27/2024 at 05:18AM

87
#117 - mario / @mario84586731

08/31/2020 at 01:27PM

90
#118 - Dominic Z / @thammaaa

12/21/2017 at 09:10AM

100
#119 - leo / @leo93755786

08/27/2020 at 12:33PM