Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Leaderboard, Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 50ad2cb165b8db0002000029

Unwrap the text of an email message

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

Start file
> "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
> doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
> veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim
> ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit.

Lorem ipsum dolor sit amet, consectetur adipisicing 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.

> Sed quia consequuntur magni dolores eos qui ratione voluptatem sequi
> nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet,
> consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt
> ut labore et dolore magnam aliquam quaerat voluptatem.

Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit
laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure
reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur,
vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
End file
> "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit.

Lorem ipsum dolor sit amet, consectetur adipisicing 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.

> Sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"

View Diff

1,4c1
< > "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
< > doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
< > veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim
< > ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit.
---
> > "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit.
6,8c3
< Lorem ipsum dolor sit amet, consectetur adipisicing 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.
---
> Lorem ipsum dolor sit amet, consectetur adipisicing 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.
10,13c5
< > Sed quia consequuntur magni dolores eos qui ratione voluptatem sequi
< > nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet,
< > consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt
< > ut labore et dolore magnam aliquam quaerat voluptatem.
---
> > Sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
15,18c7
< Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit
< laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure
< reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur,
< vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
---
> Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"

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 40 remaining solutions by signing in and submitting your own entry
#41 Armin / @twistedcommons - Score: 26 - 02/10/13 @ 19:17
4J2j3J2j4J2j4J:%s/ >//g|x<CR>

0 comments

#42 N / @nymph192 - Score: 26 - 02/24/13 @ 18:06
4J2j3J2j4J2j4J:%s/ >//g<CR>ZZ

0 comments

#43 Chase Stubblefield / @sterlingchase - Score: 26 - 04/29/13 @ 21:12
4J2j3J2j4J2j4J:%s/ >//g<CR>ZZ

0 comments

#44 Franck / @_frp - Score: 26 - 03/06/14 @ 03:02
4J}j3J)j4J)j4J:%s/ >//g<CR>ZZ

0 comments

#45 n0nick / @n0nick - Score: 27 - 12/17/12 @ 08:37
qqj<C-V>ljjdk4Jqjj3Jjj0@qjj4JZZ

0 comments

#46 Oh fear / @ohfear_num - Score: 28 - 11/28/12 @ 21:31
qq4J:s/ >//g<CR>qjj3Jjj@qjj4JZZ

0 comments

#47 mhb / @mhbvim - Score: 29 - 11/23/12 @ 01:21
qqvipJ2jq@q@@@@:%s/ > / /g<CR>ZZ

0 comments

#48 brett / @brettyukich - Score: 29 - 10/01/13 @ 02:36
}o<Esc>}.}.:v/^$/-j|%s/ > / /g<CR>ZZ

0 comments

#49 Patrick Mosby / @halbtuerke - Score: 31 - 11/21/12 @ 21:21
j<C-V>jjxkJJJ2jJJ3j0<C-V>jjxkJJJ2jJJJZZ

0 comments

#50 Rob Glew / @RealGlew - Score: 33 - 06/13/14 @ 07:52
qqA<Del><Del><Esc>q2@qjjqwA<Del> <Esc>q@w5G3@q7G3@wZZ

0 comments

#51 Ravi S Sinha / @ambidextrousTx - Score: 36 - 11/21/12 @ 19:48
j2xj.j.11G.j.j.vipJjj.6G.i<CR><Esc>ggvipJZZ

0 comments

Created by: @udioica

51 active golfers, 102 entries

Leaderboard (lowest score wins):
Ewbdmdtg_normal
16
#1 - Tim Chase / @gumnos

11/21/2012 at 01:32PM

Q6hrg93p4r3hn56thmd0_normal
16
#2 - Urtica dioica / @udioica

11/21/2012 at 01:44PM

3ubh7kcfj18s5m9erc6p_normal
16
#3 - Marcin Sza / @coot_

11/22/2012 at 02:58AM

4654945923_eb2c60ee5f_normal
16
#4 - Kerson Hsiao / @KersonHsiao

11/22/2012 at 04:04AM

40051_789281885907_29616532_44170636_2091417_n_normal
16
#5 - Conner McDaniel / @connermcd

11/22/2012 at 07:57AM

Vcwwccib_normal
16
#6 - Pete Johns / @johnsyweb

11/22/2012 at 06:40PM

K60lgrkizu2mhav74yz1_normal
16
#7 - Danilo / @dbrgn

11/23/2012 at 01:37AM

Default_profile_1_normal
16
#8 - a24f0600 / @a24f0600

11/23/2012 at 06:18AM

Pupulon_normal
16
#9 - David Barnett / @mu_mind

11/23/2012 at 01:46PM

Default_profile_4_normal
16
#10 - František Hartman / @frant_hartm

12/06/2012 at 12:21PM

Default_profile_1_normal
16
#11 - Hubba / @HubbaBubbaFett

12/09/2012 at 11:43AM

Default_profile_5_normal
16
#12 - cdan / @cdan

01/09/2013 at 02:46PM

Avatar_normal
16
#13 - Christopher Harrison / @Xophmeister

01/29/2013 at 07:07AM

Bunnies_normal
16
#14 - Trevor Powell / @DoomedBunnies

03/19/2013 at 11:21PM

Default_profile_5_normal
16
#15 - Gtranbot / @gtranbot

04/27/2013 at 02:52AM

7bbd949b345fcbcfd812b231aed89f99_normal
16
#16 - Marco Hinz / @_mhinz_

05/26/2013 at 03:39AM

Default_profile_5_normal
16
#17 - Nick S / @MaxxMeridius

08/23/2013 at 05:57PM

Arcadia_avatar_normal
16
#18 - James / @Dronak

09/02/2013 at 07:49PM

Default_profile_2_normal
16
#19 - Steven Mueller / @Gervigok

10/06/2013 at 01:08PM

Default_profile_1_normal
16
#20 - Raphael / @rnstlr

11/26/2013 at 03:23PM

Default_profile_6_normal
16
#21 - Pandu / @pandu_golf

01/05/2014 at 02:29AM

8ig-egq0_normal
16
#22 - John Braxler / @braxler

06/13/2014 at 08:16AM

E942f68ca0e27eac0b2633f7dab8239f_normal
17
#23 - Enric / @VonKiike

12/13/2012 at 10:35AM

2547153343_5dff0945de_normal
19
#24 - Allan Espinosa / @AllanEspinosa

11/23/2012 at 04:30AM

Default_profile_3_normal
23
#25 - Édouard M'tou / @DouardM

12/19/2012 at 12:21PM

C9315f734465f1906d4e615b826fb3d1_normal
23
#26 - Alec Goebel / @zego5360

01/04/2013 at 09:46AM

Av_normal
24
#27 - Vasil Sakarov / @vsakarov

11/21/2012 at 02:39PM

Img_3126__1__normal
24
#28 - Pawel Obrok / @mrYapee

11/23/2012 at 11:49AM

Cmddu61oqqom5ujcl44v_normal
24
#29 - Jamie / @jamiebikies

11/23/2012 at 02:35PM

Bc879469f279ee24b7fbdfad7c2216d9_normal
24
#30 - 無ん垢の叫び / @john_ababa

11/25/2012 at 02:31AM

O78a2ujeqbyrqkgsuto8_normal
24
#31 - Alex Hammel / @AlexJHammel

12/24/2012 at 06:26AM

Default_profile_6_normal
24
#32 - Lari / @larifariman

04/17/2013 at 02:47PM

8f3d8whrmgnmpzcews8o_normal
24
#33 - zlydem / @zlydem

07/03/2013 at 02:49AM

Default_profile_6_normal
24
#34 - Tullio Facchinetti / @toolleeo

07/25/2013 at 02:01PM

Default_profile_5_normal
24
#35 - cj / @cj01101

10/19/2013 at 11:34AM

Netti_pihlajo1_lthumb_normal
24
#36 - Joonas Pihlajamaa / @jokkebk

03/18/2014 at 01:04AM

Default_profile_3_normal
25
#37 - Lieven Keersmaekers / @LievenKeersmaek

11/23/2012 at 12:13PM

Default_profile_5_normal
25
#38 - XGOLFER / @vimg0lfer

01/04/2013 at 03:13PM

Default_profile_5_normal
26
#39 - Jason Wolf / @zephyr_wolf

11/21/2012 at 12:43PM

Yukata_profile_normal
26
#40 - Aniket Schneider / @shaydwyrm

11/23/2012 at 10:08PM

Default_profile_3_normal
26
#41 - Armin / @twistedcommons

02/10/2013 at 07:17PM

Default_profile_2_normal
26
#42 - N / @nymph192

02/24/2013 at 06:06PM

Untitled-1_normal
26
#43 - Chase Stubblefield / @sterlingchase

04/29/2013 at 09:12PM

E2b8d84a001d3f884f967374f95adce5_normal
26
#44 - Franck / @_frp

03/06/2014 at 03:02AM

9aaede1a87631c292fd5e27c5df320be_normal
27
#45 - n0nick / @n0nick

12/17/2012 at 08:37AM

6c844nfj_normal
28
#46 - Oh fear / @ohfear_num

11/28/2012 at 09:31PM

0eac0267dbe74aebf3c8129f2e65accd_normal
29
#47 - mhb / @mhbvim

11/23/2012 at 01:21AM

Default_profile_6_normal
29
#48 - brett / @brettyukich

10/01/2013 at 02:36AM

Avatar_80x80_normal
31
#49 - Patrick Mosby / @halbtuerke

11/21/2012 at 09:21PM

Pjkuhhig_normal
33
#50 - Rob Glew / @RealGlew

06/13/2014 at 07:52AM

Ba1070d8841ff40257904144ae3db536_normal
36
#51 - Ravi S Sinha / @ambidextrousTx

11/21/2012 at 07:48PM