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 50 remaining solutions by signing in and submitting your own entry
#51 ikigai / ikigai27357012 - Score: 30 - 06/18/18 @ 12:03
jqq2wyw2Wi$row[<Esc>lpla]<Esc>0jq3@qZZ

0 comments


#52 Zyurs / The_Zyurs - Score: 31 - 12/15/17 @ 14:03
/'<CR>qalywnni$row[<Esc>lp<Esc>la]<Esc>nq3@aZZ

0 comments


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

0 comments


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

0 comments


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


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


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

0 comments


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

0 comments


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

0 comments


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


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


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


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

63 active golfers, 162 entries

Leaderboard (lowest score wins):
26
#31 - Mike Harris / MikeMJHarris

12/19/2017 at 12:20PM

26
#32 - Camillott Games / camillottgames

04/18/2018 at 11:18PM

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

12/17/2017 at 02:58AM

27
#34 - mnx / mnxx

01/04/2018 at 10:45AM

28
#35 - h43z / h43z

12/15/2017 at 03:03PM

28
#36 - Henrique Malheiro / rike09

12/15/2017 at 10:22PM

28
#37 - Bob Johnson / BobJohn72127595

12/19/2017 at 09:04AM

28
#38 - 小山内まい / osanamity

12/23/2017 at 06:24PM

28
#39 - あっつぉ / tadokorohitoshi

12/26/2017 at 02:58AM

28
#40 - Blake Tereau / BlakeTereau

01/12/2018 at 03:46PM

28
#41 - Rah'tol Samok🖖 / ralokt

01/23/2018 at 10:14AM

28
#42 - Walter McLallen / wmclallen

02/02/2018 at 01:15AM

28
#43 - Dennis Burke / ikirudennis

02/03/2018 at 04:47PM

28
#44 - Arijus / argshook

02/09/2018 at 09:34AM

28
#45 - 石奕心 / allenshih1

06/07/2018 at 03:38AM

28
#46 - qwertyu / qwertyu78679259

06/12/2018 at 04:43AM

29
#47 - Luong Nguyen / LuongNguyen_95

01/13/2018 at 03:50PM

30
#48 - Brian Hall / _bruab_

12/15/2017 at 03:17PM

30
#49 - Martin Pedersen / M4R7iNP

12/29/2017 at 01:56PM

30
#50 - Jonathan Camilleri / Too_Many_Taken

05/27/2018 at 11:16AM

30
#51 - ikigai / ikigai27357012

06/18/2018 at 12:03PM

31
#52 - Zyurs / The_Zyurs

12/15/2017 at 02:03PM

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

03/20/2018 at 07:17AM

33
#54 - Ahmed Hasan / microbialwalrus

12/25/2017 at 06:18PM

37
#55 - Wolly Woodpecker / WollyWoodpecker

01/01/2018 at 04:00PM

40
#56 - eric / ericandrewlewis

12/15/2017 at 01:41PM

40
#57 - Mathieu Larouche / matdube

12/15/2017 at 08:50PM

41
#58 - Miki Tebeka / tebeka

12/15/2017 at 04:59AM

41
#59 - Mikael Axelsson / Mikael_Axelsson

12/15/2017 at 06:48AM

44
#60 - allinonemovie / allinonemovie

12/17/2017 at 05:28PM