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 56462467f20fe74c93000001

lipsum lines

Convert a quoted block of text into strings in a list.

Start file
"Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt...
...ut labore et dolore magna aliqua.
Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris...
...nisi ut aliquip ex ea commodo consequat."
End file
lipsum = ["Lorem ipsum dolor sit amet,",
       
"consectetur adipiscing elit,",
       
"sed do eiusmod tempor incididunt...",
       
"...ut labore et dolore magna aliqua.",
       
"Ut enim ad minim veniam,",
       
"quis nostrud exercitation ullamco laboris...",
       
"...nisi ut aliquip ex ea commodo consequat."]

View Diff

1,7c1,7
< "Lorem ipsum dolor sit amet,
< consectetur adipiscing elit,
< sed do eiusmod tempor incididunt...
< ...ut labore et dolore magna aliqua.
< Ut enim ad minim veniam,
< quis nostrud exercitation ullamco laboris...
< ...nisi ut aliquip ex ea commodo consequat."

---
> lipsum = ["Lorem ipsum dolor sit amet,",
>       "consectetur adipiscing elit,",
>       "sed do eiusmod tempor incididunt...",
>       "...ut labore et dolore magna aliqua.",
>       "Ut enim ad minim veniam,",
>       "quis nostrud exercitation ullamco laboris...",
>       "...nisi ut aliquip ex ea commodo consequat."]

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 94 remaining solutions by signing in and submitting your own entry
#95 vimgolfacc / @supergopivimgo1 - Score: 68 - 02/28/16 @ 15:34
<Esc>:%s/"//g<CR>:<Up><Up><BS><BS><BS><BS>\*.*<BS><BS><BS><BS>\(.*\)/"\1",/g<CR><End>a<BS>]<Esc>ggilipsum = [<Esc>jvG><Esc>:wq<CR>

0 comments


Created by: @coryknapp

95 active golfers, 278 entries

Leaderboard (lowest score wins):
28
#1 - "Smylers" / @Smylers2

11/17/2015 at 11:00AM

28
#2 - Paulo H Baumann / @PauloBaumann

11/18/2015 at 03:11PM

28
#3 - chris nojima / @chrisnojima

11/23/2015 at 01:12AM

28
#4 - Patrick Cichon / @the_nQL

12/07/2015 at 07:48PM

28
#5 - Matthew Desjardins / @Desjardins_M

12/11/2015 at 09:17PM

28
#6 - Faat / @i_faat

12/18/2015 at 06:14PM

28
#7 - jackliusr / @jackliusr

01/13/2016 at 05:53AM

28
#8 - Roberto Carraretto / @robcarraretto

01/27/2016 at 10:57PM

28
#9 - Aleksey Zhidkov / @AlexeyZhidkov

02/01/2016 at 04:59AM

28
#10 - ben kavanagh / @bkava

02/23/2016 at 04:42PM

28
#11 - Michel Ganguin / @tinycrazyfish

03/03/2016 at 12:27PM

28
#12 - Ram Tamtam / @ramtamtamtam

06/30/2016 at 02:45PM

28
#13 - Stanislav / @prstad

10/19/2016 at 11:40AM

28
#14 - trx / @trxdbg

10/27/2016 at 12:50PM

28
#15 - Victor Ashton / @victor_ashton

04/27/2018 at 12:26AM

28
#16 - Miłosz Łakomy / @foobar01123

04/09/2020 at 11:50AM

28
#17 - Jean George / @JeanGeo20504212

03/29/2022 at 02:22PM

28
#18 - Peppa Pig / @PeppaPigSg

06/25/2024 at 03:50AM

28
#19 - nickGPT / @nickandbro

08/28/2024 at 03:47AM

29
#20 - Jon Krause / @jkrause314

11/14/2015 at 09:59PM

29
#21 - John Braxler / @braxler

11/17/2015 at 02:26PM

29
#22 - Urtica dioica / @udioica

12/20/2015 at 08:36AM

29
#23 - John Smith / @literacyisgood

03/10/2016 at 07:03PM

29
#24 - Saki Gw / @Sakigw

04/10/2016 at 11:27AM

29
#25 - Turkey Man / @lvturkeyman

11/24/2017 at 06:56PM

29
#26 - Lory / @Lory46845742

12/11/2019 at 03:23PM

30
#27 - Hermit McDermot / @hermit_mcdermot

11/14/2015 at 02:52PM

30
#28 - agricantare / @agricantare

11/14/2015 at 08:38PM

30
#29 - Petro Тrouq / @zulolosi

11/14/2015 at 10:02PM

30
#30 - Pete Sevander / @Sevanteri

11/17/2015 at 09:30AM