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):
30
#31 - herbage / @herbage2

11/18/2015 at 12:55PM

30
#32 - Casey Pearring / @StandardBias

11/27/2015 at 08:55PM

30
#33 - Lifepillar / @lifepillar

12/08/2015 at 11:27AM

30
#34 - Jan Path / @jan_path

12/18/2015 at 12:44PM

30
#35 - retro / @tryphopp

01/20/2016 at 08:10AM

30
#36 - Dimitar Dimitrov / @kurkale6ka

03/14/2016 at 02:04PM

30
#37 - Dinesh Bhosale / @MrDineshBhosale

04/01/2016 at 05:32PM

30
#38 - Mihai / @mihaicristiant

02/22/2019 at 04:09PM

31
#39 - Robert Goeddel / @f0rdpr3fect

11/13/2015 at 07:11PM

31
#40 - Jason Schulz / @uxcn_

11/15/2015 at 03:45AM

31
#41 - Walker Boh / @walker_boh

11/16/2015 at 12:17PM

31
#42 - Quota / @Quotad

11/19/2015 at 12:47PM

31
#43 - territorialmale / @territorialmale

11/20/2015 at 05:39AM

31
#44 - EatYourGreens / @VimTwo

11/30/2015 at 04:58PM

31
#45 - Roberto Alegro / @robertoaall

11/30/2015 at 07:51PM

31
#46 - Kostas / @blackraven_13

02/24/2016 at 09:29PM

31
#47 - Michael Buckley / @apolatg

03/05/2016 at 05:07PM

31
#48 - Carlos A Henríquez Q / @lagunex

03/13/2016 at 03:04PM

31
#49 - DHM / @DHM29978992

04/30/2018 at 05:03PM

32
#50 - emblox / @emblox

11/19/2015 at 09:27PM

32
#51 - AD / @Lievr0

11/21/2015 at 05:41AM

32
#52 - Marty Boren / @beanmaximalist

11/29/2015 at 12:49AM

32
#53 - vic © / @2r2w

05/23/2016 at 10:28AM

32
#54 - George Angelopoulos / @g_usermod

08/04/2016 at 11:08PM

32
#55 - Will / @obiwan__k3n00bi

09/01/2016 at 02:48AM

32
#56 - TweetDreams / @TweetMusicians

10/16/2016 at 07:01AM

32
#57 - Marcel Akkerman / @MarcelAkkerman

12/22/2016 at 12:11PM

32
#58 - Pablo Acuna / @pacuna

11/16/2024 at 02:40AM

33
#59 - Ryuichiro / @ryuichiro44

11/19/2015 at 07:21PM

33
#60 - Gerald Tilma / @GeraldTilma

11/22/2015 at 05:05PM