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 57cf3e398c660c1f8f014717

Paragraph breaks

Swap the blank lines and the aaa lines.

Start file
aa
a
aaa

aa
a
aaa

aa
a
aaa

aa
a
End file
aa
a

aaa
aa
a

aaa
aa
a

aaa
aa
a

View Diff

Looking for a hint? I'm not giving one!

Looking for a diff? Not giving that either.

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 137 remaining solutions by signing in and submitting your own entry
#138 Matt Walsh / @wattmalsh - Score: 52 - 02/08/17 @ 08:07
:%s/aaa\|^$/\=submatch(0) == "aaa" ? "" : "aaa"/g<CR>ZZ

0 comments


Created by: @udioica

138 active golfers, 376 entries

Leaderboard (lowest score wins):
10
#1 - John Braxler / @braxler

09/07/2016 at 03:49PM

10
#2 - Urtica dioica / @udioica

09/07/2016 at 06:53PM

10
#3 - jaresty / @jaresty

09/07/2016 at 09:07PM

10
#4 - Caleb Prashant / @calebprashant

09/12/2016 at 01:21PM

10
#5 - David Montague / @sirlamps

09/16/2016 at 06:19PM

10
#6 - Sahar Rachamim / @SRachamim

09/19/2016 at 08:59PM

10
#7 - Christian Albertsen / @mannahusum

09/20/2016 at 11:36AM

10
#8 - 何晨 / @hechen0_

09/22/2016 at 05:14PM

10
#9 - Nico / @_Nico_Caro

09/23/2016 at 06:48PM

10
#10 - James Pringle / @jameskpringle

09/28/2016 at 04:05PM

10
#11 - Jeremiah Gibson / @jeremiah4691

09/28/2016 at 10:39PM

10
#12 - manbogot / @gmanbor

10/02/2016 at 09:16AM

10
#13 - Nikos Kwlos / @Kwlos_Calling

10/07/2016 at 08:00PM

10
#14 - trx / @trxdbg

10/10/2016 at 09:02AM

10
#15 - jinx balotchnik / @balotchnik

10/14/2016 at 02:18AM

10
#16 - Chris Hampson / @ChrisHampsonGTD

10/15/2016 at 11:16AM

10
#17 - Brian Mego / @Major251

10/17/2016 at 04:04AM

10
#18 - 子皓翁 / @geniusgordon

10/29/2016 at 04:12PM

10
#19 - Alan Turing / @alantrng

11/15/2016 at 11:45AM

10
#20 - Patrick Sanan / @patricksanan

01/10/2017 at 02:39PM

10
#21 - Michael Buckley / @apolatg

01/16/2017 at 10:01PM

10
#22 - sijinyuan / @sijinyuan

02/20/2017 at 01:29AM

10
#23 - Alexander Bessonov / @nonsleepr

03/15/2017 at 10:29PM

10
#24 - Ilya Shakirov / @aelaau

03/22/2017 at 09:29AM

10
#25 - Tyler Holien / @tylerholien

03/27/2017 at 04:29AM

10
#26 - 梧桐王子 / @WutongYujie

04/27/2017 at 06:00AM

10
#27 - Melvin Cheung / @MelvinCheung

05/26/2017 at 03:45AM

10
#28 - tomb0y / @tomb0_0y

05/29/2017 at 07:15PM

10
#29 - Turkey Man / @lvturkeyman

11/11/2017 at 05:56PM

10
#30 - c0llision / @0xc0llision

01/28/2018 at 09:32AM