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 45 remaining solutions by signing in and submitting your own entry
#46 Zyurs / The_Zyurs - Score: 31 - 12/15/17 @ 14:03
/'<CR>qalywnni$row[<Esc>lp<Esc>la]<Esc>nq3@aZZ

0 comments

#47 DQMSL対戦募集ツイートbot / foronlinegamer - Score: 32 - 03/20/18 @ 07:17
qa/'<CR>lyiwnnpla]<Esc>NNi$row[<Esc>$q3@aZZ

0 comments

#48 Ahmed Hasan / microbialwalrus - Score: 33 - 12/25/17 @ 18:18
jf'qdlvwhy2f'i$row[<Esc>lpla]<Esc>Wq3@dZZ

0 comments

#49 Wolly Woodpecker / WollyWoodpecker - Score: 37 - 01/01/18 @ 16:00
jqwf'vf'y$i]<Esc>bi$row[<C-R>0<Del><Del><Esc>j0q3@w<Up>$r]ZZ

0 comments

#50 eric / ericandrewlewis - Score: 40 - 12/15/17 @ 13:41
jqayi'f>lli$row['<C-R>0']<Esc>lxxj0q@a@@@@:w<CR>:q<CR>

0 comments

#51 Mathieu Larouche / matdube - Score: 40 - 12/15/17 @ 20:50
:%s/\('\w\+'\) => ''/\1 => $row[\1]/g<CR>ZZ

0 comments

#52 Miki Tebeka / tebeka - Score: 41 - 12/15/17 @ 04:59
:%s/'\(.*\)' => ''/'\1' => $row['\1']/<CR>ZZ

0 comments

#53 Mikael Axelsson / Mikael_Axelsson - Score: 41 - 12/15/17 @ 06:48
:%s/'\(.*\)' => ''/'\1' => $row['\1']/<CR>ZZ

0 comments

#54 allinonemovie / allinonemovie - Score: 44 - 12/17/17 @ 17:28
jqqf'vf'yf';i$row[<Esc>lvlpa]<Esc>q:3,5norm! @q<CR>:wq<CR>

0 comments

#55 Guillaume Seren / guillaumeseren - Score: 61 - 04/18/18 @ 07:49
:<50-53>%s/\s\{4\}'\(.\+\)' => ''/    '\1' => $row['\1']/<Esc>[201~g<CR>ZZ

0 comments

#56 BitLad / BitLad - Score: 74 - 01/31/18 @ 15:40
jEelli<0xc2><0xa3><BS>$row[<Esc>jb.jl,.jh.lau<C-N><Esc>la]<Esc>kh.<Esc>hhac<C-N><Esc>kblao<C-N><C-N><Esc>la]<Esc>kblaon<C-N><Esc>la[<BS>]<Esc>:wq<CR>

0 comments

#57 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

57 active golfers, 145 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 / 0xc0llision

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

24
#11 - Smylers / Smylers2

12/15/2017 at 12:59PM

24
#12 - John Braxler / braxler

12/15/2017 at 02:17PM

24
#13 - Jon Krause / jkrause314

12/15/2017 at 03:34PM

24
#14 - Sage san / sagesancast

12/17/2017 at 08:15PM

24
#15 - Saki Gw / Sakigw

12/19/2017 at 02:00PM

24
#16 - deepak / utopianmonk

12/22/2017 at 10:01AM

24
#17 - BarbaJol / drpproteus

12/30/2017 at 05:29PM

24
#18 - 梧桐王子 / WutongYujie

01/05/2018 at 03:38AM

24
#19 - Alphonse Mariya / alfunx

01/08/2018 at 10:13PM

24
#20 - Семён Марьясин / MaryasinS

01/12/2018 at 11:30AM

24
#21 - Lifepillar / lifepillar

05/10/2018 at 07:01PM

25
#22 - Jan Bundesmann / ixjab

12/15/2017 at 11:17AM

25
#23 - Bradley M. Small / BradleySmall

12/15/2017 at 11:51AM

25
#24 - gink / anagiwa

12/18/2017 at 07:58AM

25
#25 - BareTull / BareTull3

12/18/2017 at 04:45PM

26
#26 - tPenguinLTG / tpenguinltg

12/15/2017 at 06:02AM

26
#27 - AleksandarTrifunovic / akstrfn

12/15/2017 at 08:34AM

26
#28 - Lajos Koszti / Ajnasz

12/15/2017 at 11:11AM

26
#29 - Mike Harris / MikeMJHarris

12/19/2017 at 12:20PM

26
#30 - Camillott Games / camillottgames

04/18/2018 at 11:18PM

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

12/17/2017 at 02:58AM

27
#32 - mnx / mnxx

01/04/2018 at 10:45AM

28
#33 - h43z / h43z

12/15/2017 at 03:03PM

28
#34 - Henrique Malheiro / rike09

12/15/2017 at 10:22PM

28
#35 - Bob Johnson / BobJohn72127595

12/19/2017 at 09:04AM

28
#36 - 小山内まい / osanamity

12/23/2017 at 06:24PM

28
#37 - あっつぉ / tadokorohitoshi

12/26/2017 at 02:58AM

28
#38 - Blake Tereau / BlakeTereau

01/12/2018 at 03:46PM

28
#39 - Rah'tol Samok🖖 / ralokt

01/23/2018 at 10:14AM

28
#40 - Walter McLallen / wmclallen

02/02/2018 at 01:15AM

28
#41 - Dennis Burke / ikirudennis

02/03/2018 at 04:47PM

28
#42 - Arijus / argshook

02/09/2018 at 09:34AM

29
#43 - Luong Nguyen / LuongNguyen_95

01/13/2018 at 03:50PM

30
#44 - Brian Hall / _bruab_

12/15/2017 at 03:17PM

30
#45 - Martin Pedersen / M4R7iNP

12/29/2017 at 01:56PM

31
#46 - Zyurs / The_Zyurs

12/15/2017 at 02:03PM

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

03/20/2018 at 07:17AM

33
#48 - Ahmed Hasan / microbialwalrus

12/25/2017 at 06:18PM

37
#49 - Wolly Woodpecker / WollyWoodpecker

01/01/2018 at 04:00PM

40
#50 - eric / ericandrewlewis

12/15/2017 at 01:41PM

40
#51 - Mathieu Larouche / matdube

12/15/2017 at 08:50PM

41
#52 - Miki Tebeka / tebeka

12/15/2017 at 04:59AM

41
#53 - Mikael Axelsson / Mikael_Axelsson

12/15/2017 at 06:48AM

44
#54 - allinonemovie / allinonemovie

12/17/2017 at 05:28PM

61
#55 - Guillaume Seren / guillaumeseren

04/18/2018 at 07:49AM

74
#56 - BitLad / BitLad

01/31/2018 at 03:40PM

90
#57 - Dominic Z / thammaaa

12/21/2017 at 09:10AM