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 4d1b3d57c58eaa2a8a000510

Sorting paragraphs

Order the paragraphs correctly, per prefixed index

Start file
4) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla feugiat placerat odio. 
Praesent tempus, enim eget fermentum dictum, libero ante commodo enim, a adipiscing arcu arcu et erat. 
Ut ipsum neque, ornare nec condimentum a, feugiat et felis.

3) Nam vehicula velit mollis arcu vulputate tempus. Sed lobortis ante non ligula aliquet elementum.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus pharetra, 
orci id commodo malesuada, mauris dolor viverra felis, eget euismod libero turpis vel nisi.

2) Phasellus mauris ipsum, placerat nec pellentesque ac, tristique vitae risus. 
Mauris rhoncus erat at eros feugiat blandit. Nulla facilisi. Vivamus semper blandit viverra. 
Mauris quis arcu quis purus feugiat auctor.

6) Sed id eros quis metus pellentesque pellentesque eget quis erat. Curabitur quis sapien turpis, sed ullamcorper 
ipsum. In hac habitasse platea dictumst. Sed quis elit eu elit congue vestibulum. Duis tincidunt pellentesque 
convallis. Mauris accumsan suscipit placerat. Nullam mattis vulputate enim non volutpat.

1) Morbi ultricies arcu erat. Praesent iaculis fermentum odio, in suscipit lorem congue id. 
Sed euismod felis nec ipsum laoreet et suscipit justo vulputate. Donec lorem odio, lobortis ut 
scelerisque sed, interdum nec augue.

5) Aenean in lorem mi. Mauris ac eros mi. In accumsan urna eu nibh euismod non imperdiet quam fringilla. 
Integer orci massa, mattis adipiscing commodo vel, cursus in lorem.
End file
1) Morbi ultricies arcu erat. Praesent iaculis fermentum odio, in suscipit lorem congue id. 
Sed euismod felis nec ipsum laoreet et suscipit justo vulputate. Donec lorem odio, lobortis ut 
scelerisque sed, interdum nec augue.

2) Phasellus mauris ipsum, placerat nec pellentesque ac, tristique vitae risus. 
Mauris rhoncus erat at eros feugiat blandit. Nulla facilisi. Vivamus semper blandit viverra. 
Mauris quis arcu quis purus feugiat auctor.

3) Nam vehicula velit mollis arcu vulputate tempus. Sed lobortis ante non ligula aliquet elementum.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus pharetra, 
orci id commodo malesuada, mauris dolor viverra felis, eget euismod libero turpis vel nisi.

4) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla feugiat placerat odio. 
Praesent tempus, enim eget fermentum dictum, libero ante commodo enim, a adipiscing arcu arcu et erat. 
Ut ipsum neque, ornare nec condimentum a, feugiat et felis.

5) Aenean in lorem mi. Mauris ac eros mi. In accumsan urna eu nibh euismod non imperdiet quam fringilla. 
Integer orci massa, mattis adipiscing commodo vel, cursus in lorem.

6) Sed id eros quis metus pellentesque pellentesque eget quis erat. Curabitur quis sapien turpis, sed ullamcorper 
ipsum. In hac habitasse platea dictumst. Sed quis elit eu elit congue vestibulum. Duis tincidunt pellentesque 
convallis. Mauris accumsan suscipit placerat. Nullam mattis vulputate enim non volutpat.

View Diff

1,7c1,3
< 4) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla feugiat placerat odio. 
< Praesent tempus, enim eget fermentum dictum, libero ante commodo enim, a adipiscing arcu arcu et erat. 
< Ut ipsum neque, ornare nec condimentum a, feugiat et felis.
< 
< 3) Nam vehicula velit mollis arcu vulputate tempus. Sed lobortis ante non ligula aliquet elementum.
< Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus pharetra, 
< orci id commodo malesuada, mauris dolor viverra felis, eget euismod libero turpis vel nisi.
---
> 1) Morbi ultricies arcu erat. Praesent iaculis fermentum odio, in suscipit lorem congue id. 
> Sed euismod felis nec ipsum laoreet et suscipit justo vulputate. Donec lorem odio, lobortis ut 
> scelerisque sed, interdum nec augue.
13,15c9,11
< 6) Sed id eros quis metus pellentesque pellentesque eget quis erat. Curabitur quis sapien turpis, sed ullamcorper 
< ipsum. In hac habitasse platea dictumst. Sed quis elit eu elit congue vestibulum. Duis tincidunt pellentesque 
< convallis. Mauris accumsan suscipit placerat. Nullam mattis vulputate enim non volutpat.
---
> 3) Nam vehicula velit mollis arcu vulputate tempus. Sed lobortis ante non ligula aliquet elementum.
> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus pharetra, 
> orci id commodo malesuada, mauris dolor viverra felis, eget euismod libero turpis vel nisi.
17,19c13,15
< 1) Morbi ultricies arcu erat. Praesent iaculis fermentum odio, in suscipit lorem congue id. 
< Sed euismod felis nec ipsum laoreet et suscipit justo vulputate. Donec lorem odio, lobortis ut 
< scelerisque sed, interdum nec augue.
---
> 4) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla feugiat placerat odio. 
> Praesent tempus, enim eget fermentum dictum, libero ante commodo enim, a adipiscing arcu arcu et erat. 
> Ut ipsum neque, ornare nec condimentum a, feugiat et felis.
22a19,22
> 
> 6) Sed id eros quis metus pellentesque pellentesque eget quis erat. Curabitur quis sapien turpis, sed ullamcorper 
> ipsum. In hac habitasse platea dictumst. Sed quis elit eu elit congue vestibulum. Duis tincidunt pellentesque 
> convallis. Mauris accumsan suscipit placerat. Nullam mattis vulputate enim non volutpat.

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 111 remaining solutions by signing in and submitting your own entry
#112 Pierre / Pihour - Score: 43 - 01/01/11 @ 10:04
"r4dd"e4dd"z4dd"ad}dd/5<CR>"zPn"ePn"rPGo<Esc>"apZZ

0 comments


#113 John Smith / c2kdev21 - Score: 43 - 04/03/13 @ 09:08
/6<CR>qqv}:m0<CR>q:m0<CR>/5<CR>@q/4<CR>@q/3<CR>@q/2<CR>@q/1<CR>@qZZ

0 comments


#114 Gurukandhamoorthi / Gurukandhamoor1 - Score: 43 - 08/10/17 @ 17:22
/6<CR>dapGpO<Esc>/4<CR>dap/5<CR>P/3<CR>dap/4<CR>P/1<CR>dapHPGddZZ

0 comments


#115 Kris Jenkins / krisajenkins - Score: 44 - 12/30/10 @ 00:44
VjjjdGkkpkVkkkd1GPjjjjVjjjd}p}VjjjdGp:wq<CR>

0 comments


#116 Mikel Ward / mikelward - Score: 44 - 12/30/10 @ 11:45
:%s/\n\([^\n]\)/!\1/<CR>:sor<CR>:%s/!/<C-V><CR>/g<CR>ddkkPZZ

0 comments


#117 Raphaël De Giusti / raphdg - Score: 44 - 10/28/11 @ 08:47
/1<CR>qqd}GpO<Esc>q/2<CR>@q/3<CR>@q/4<CR>@q/5<CR>@q/6<CR>@qggd6dZZ

0 comments


#118 Jaime A. Sánchez / jashbeta - Score: 44 - 12/22/11 @ 06:53
/6<CR>qq4ddHPq/5<CR>@q/4<CR>@q/3<CR>@q/2<CR>@q/1<CR>@qLddkkPZZ

0 comments


#119 Aleksander Balicki / alekbalicki - Score: 45 - 12/29/10 @ 14:34
d4d3jpggd8d3jpggd12d:8<CR>pggd4dGp<Insert><CR><Esc>Gdd<Esc>ZZ

0 comments


#120 Barry Ezell / barryezl - Score: 46 - 12/29/10 @ 16:04
qbd/\d<CR>q16Gpgg@B12Gpgg@@8Gpgg@@Go<Esc>pGdd<Esc>:wq<CR>

0 comments


#121 Guillaume Bonnoron / gbonnoron - Score: 46 - 12/30/10 @ 21:58
13Gqq4dd1GPq21G@q7G@q11G@q15G@q19G@q22GddkkPZZ

0 comments


#122 Tatsuro Baba / _tbaba - Score: 46 - 04/07/11 @ 08:26
4}qaj4ddqggP3}a<Esc>@a3{p2}@a2{p3}@a{pj<CR>Gdd:18<CR>pZZ

0 comments


#123 pet_rock / pet_rock - Score: 46 - 07/30/11 @ 16:58
12jqaV}dggPq20j@a6j@a10j@a14j@a18j@aLdd2ki<CR><Esc>ZZ

0 comments


#124 David / dpa_92 - Score: 46 - 08/01/11 @ 12:07
13Gqq4dd1GPq21G@q7G@q11G@q15G@q19G@q22GddkkPZZ

0 comments


#125 manlon / manlon - Score: 47 - 12/29/10 @ 18:19
4dd4Gp9G4ddggP17GV<Esc><Esc>4ddggP17G4ddGpko<Esc>Gdd:wq<CR>

0 comments


#126 Andrew McDonough / andrewmcdonough - Score: 47 - 12/29/10 @ 18:27
"f4dd"34dd"24dd"64dd/5<CR>i<C-R>2<C-R>3<C-R>f<Esc>jpGdd?6<CR>P:wq<CR>

0 comments


#127 Sébastien Quioc / SQuiOc - Score: 48 - 12/30/10 @ 09:48
qpV3<Down>dq:5<CR>P:9<CR>@p:0<CR>P:17<CR>@p:0<CR>P:20<CR>pu@p:16<CR>P:x<CR>

0 comments


#128 Lee Marlow / lmarlow - Score: 49 - 01/01/11 @ 06:16
17,:17,20m 0<CR>:16,19m G<CR>:<Up><BS>22<CR>:5,8m 16<CR>:9,12m 4<CR>ZZ

0 comments


#129 うえっち / uh_tomo - Score: 49 - 12/05/12 @ 07:13
/1<CR>VjjjdggP/2<CR>Vjjjd/4<CR>P/3<CR>Vjjjd/4<CR>P/6<CR>kVjjjdjjpZZ

0 comments


#130 drio / drio - Score: 50 - 01/02/11 @ 14:20
13Gqq4dd1GPq21G@q7G@q11G@q15G@q19G@q19Gi<CR><Esc>23Gdd:x<CR>

0 comments


#131 Ian Morrison / narq - Score: 51 - 05/25/12 @ 16:51
/6<CR>3ddGpi<CR><Esc>/4<CR>4dd:13<CR>p:0<CR>4dd/4<CR>P/1<CR>4dd:0<CR>P:8<CR>dd:wq<CR>

0 comments


#132 aimee / sermoa - Score: 53 - 01/03/11 @ 12:42
:4 co 22<CR>?6<CR>qqdapggPq/5<CR>@q/4<CR>@q/3<CR>@q/2<CR>@q/1<CR>@q:23d<CR>ZZ

sermoa: Horrible solution recording a macro which deletes a paragraph and pastes it at the beginning of the file. Involves me manually searching for the number of each paragraph i wish to move. Also requires putting a blank line at the end of the file, which i later have to delete. Would love to know a better solution!

1 comment


#133 tinco / tinco - Score: 55 - 12/29/10 @ 14:58
qa4ddq:4<CR>p:9<CR>@a:1<CR>P:17<CR>@a:1<CR>P:21<CR>@a:16<CR>PO<Esc>:23<CR>dd:wq<CR>

0 comments


#134 Boris Barroso / borisb - Score: 60 - 12/29/10 @ 19:16
/1<CR>V3jdggP/2<CR>V3jd/4<CR>P/3<CR>V3jd9GP21GVjd/6<CR>P/6<CR>OG<Esc>uO<Esc>Gdd:wq<CR>

0 comments


#135 Isac Sacchi e Souza / isacssouza - Score: 60 - 12/31/10 @ 22:24
/1<CR>V<Down><Down><Down>dggP/2<CR>V<Down><Down><Down>d/4<CR>P/3<CR>V<Down><Down><Down>d/4<CR>P/6<CR>V<Down><Down>dGi<End><CR><Esc>p<Up><Up><Up><Up>dd:wq!<BS><CR>

0 comments


#136 personlink / personlink - Score: 101 - 04/07/11 @ 08:26
:17<CR>Vjjjdggi<CR><Up><Esc>pkddjj<Esc>:13<CR>Vjjjd<Esc>:4<CR>p<Esc>:13<CR>Vjjjd<Esc>:8<CR>p<Esc>:21<CR>Vjddd:16<CR>p<Esc>uuuVjddd<Esc>uuVjd:16<CR>p<Down><Down>i<CR><Down><Down><Down><Esc>dd<Esc>:wq<CR>

0 comments


#137 Shahor / Shahor - Score: 104 - 12/29/10 @ 17:02
/1<CR>VjjjdggO<Esc>pkddjjjjjjjjjjjjjkVjjjdkkkkkkkkkpjjjjjjjjVjjjdkkkkkpjjjjjjjjjjjjVj<Esc><Esc>kkVjjdkkkkkkjjjkp:q<BS>x<CR>

0 comments


#138 Stephen Paul Weber / singpolyma - Score: 109 - 12/29/10 @ 14:46
4dd3jp3j4ddggO<Esc>pdd3jO<Esc>6j3j4j4ddggpggddGd3<Up>2<Up>pupdd<Down><Down><Down><Down><Down><Down><Down><Down><Down>p<Up><Up><Up>o<Up><Up><Up>dd<Esc>dd:wq<CR>

0 comments


#139 Benjamin Small / ph1g - Score: 170 - 12/29/10 @ 16:21
jjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkjjjjjjjjjjjjjjVjjjxkkkkkkkkkkkkkkkkkkPjjjjjjjjjjjVjjjxkkkkkkkkkpjjjjjjkjjjjjjjjjjkkVjjjxjpi<CR><Esc>`jjjjjjjjjjddkkkkkkkkkkkjVjjjxkkkkkpkj:wq<CR>

0 comments


Created by: lee_jarvis

139 active golfers, 437 entries

Leaderboard (lowest score wins):
18
#1 - Urtica dioica / udioica

08/10/2012 at 08:01PM

18
#2 - Joseph J. Piché / jjpiche

08/26/2012 at 07:04AM

18
#3 - Conner McDaniel / connermcd

09/19/2012 at 02:12AM

18
#4 - John Braxler / braxler

05/13/2014 at 06:30PM

18
#5 - Walker Boh / walker_boh

12/08/2015 at 09:38AM

18
#6 - Zhihong Liu / pieapple03

03/02/2017 at 02:12AM

18
#7 - sijinyuan / sijinyuan

03/04/2017 at 01:57PM

18
#8 - Turkey Man / lvturkeyman

11/28/2017 at 04:54PM

20
#9 - Kerson Hsiao / KersonHsiao

08/10/2012 at 04:32PM

20
#10 - Hubba / HubbaBubbaFett

12/18/2012 at 06:09PM

20
#11 - Petro Тrouq / zulolosi

07/22/2013 at 12:07AM

21
#12 - Akira Matsuda / a_matsuda

01/07/2011 at 04:59AM

21
#13 - Tim Chase / gumnos

01/13/2011 at 02:36AM

21
#14 - Wei Dai / clvv42

01/13/2011 at 02:55AM

21
#15 - SirVer / SirVerII

01/22/2011 at 11:03PM

21
#16 - You-Siang Lin / yslinnctu

11/30/2011 at 01:46PM

21
#17 - Rod Knowlton / codelahoma

04/25/2012 at 12:38AM

21
#18 - a24f0600 / a24f0600

01/10/2013 at 04:48PM

21
#19 - pftb12345 / pftb12345

04/22/2015 at 06:46AM

23
#20 - Federico Galassi / federicogalassi

02/02/2011 at 12:47AM

23
#21 - Renat Aksitov / Korvin79

02/25/2012 at 10:28PM

23
#22 - brett / brettyukich

09/24/2013 at 11:41AM

24
#23 - Vitaly Kushner / vkushner

12/30/2010 at 12:56AM

24
#24 - Jacob Buys / wjbuys

12/30/2010 at 08:24PM

24
#25 - Asmund / herrasbe

01/02/2011 at 05:33PM

24
#26 - Ujjwol Lamichhane / Ujjwol

01/06/2011 at 01:15PM

24
#27 - Justin Love / wondible

06/15/2011 at 01:02PM

24
#28 - Johan Sveholm / rymdtjuren

06/30/2011 at 06:58AM

24
#29 - Hu Junfeng / junfeng

07/17/2011 at 01:47PM

24
#30 - Andrey Ivanov / Bytamine

08/11/2011 at 03:26PM