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):
27
#61 - mnx / @mnxx

01/04/2018 at 10:45AM

27
#62 - x03n046 / @x03n046

05/26/2022 at 04:43AM

27
#63 - Brandon / @Brandon10678836

08/29/2022 at 12:25PM

27
#64 - James / @Dronak

11/10/2022 at 04:32PM

28
#65 - ؜ / @h43z

12/15/2017 at 03:03PM

28
#66 - Henrique Malheiro / @rike09

12/15/2017 at 10:22PM

28
#67 - Bob Johnson / @BobJohn72127595

12/19/2017 at 09:04AM

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

12/23/2017 at 06:24PM

28
#69 - あっつぉ / @tadokorohitoshi

12/26/2017 at 02:58AM

28
#70 - Blake Tereau / @BlakeTereau

01/12/2018 at 03:46PM

28
#71 - 👻 npm install hello-world 🎃 / @ralokt

01/23/2018 at 10:14AM

28
#72 - Walter McLallen / @wmclallen

02/02/2018 at 01:15AM

28
#73 - Dennis Burke / @ikirudennis

02/03/2018 at 04:47PM

28
#74 - Arijus / @argshook

02/09/2018 at 09:34AM

28
#75 - 石奕心 / @allenshih1

06/07/2018 at 03:38AM

28
#76 - qwertyu / @qwertyu78679259

06/12/2018 at 04:43AM

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

06/29/2018 at 08:24AM

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

08/22/2018 at 03:32PM

28
#79 - Ivo Blöchliger / @aigledesalpes

08/18/2019 at 08:27AM

28
#80 - RockerZZY / @rocker_zzy

06/20/2020 at 06:06AM

28
#81 - SwordSwordSwordBird / @SwordSwordBird

11/13/2021 at 07:24AM

29
#82 - Luong Nguyen / @LuongNguyen_95

01/13/2018 at 03:50PM

29
#83 - Apox / @apox159

07/20/2018 at 08:39PM

29
#84 - Frank Korf / @OMGFrank

08/28/2018 at 07:53PM

29
#85 - vimgolfaccfekxh / @vimgolfaccfekxh

10/19/2022 at 11:49PM

30
#86 - Brian Hall / @_bruab_

12/15/2017 at 03:17PM

30
#87 - Martin Pedersen / @M4R7iNP

12/29/2017 at 01:56PM

30
#88 - Jonathan Camilleri / @Too_Many_Taken

05/27/2018 at 11:16AM

30
#89 - ikigai / @ikigai27357012

06/18/2018 at 12:03PM

31
#90 - Zyurs / @The_Zyurs

12/15/2017 at 02:03PM