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

0 comments


Created by: @udioica

150 active golfers, 424 entries

Leaderboard (lowest score wins):
13
#91 - Bruce Park / @bpark0

09/09/2016 at 06:56PM

13
#92 - tetor / @t_etor

09/09/2016 at 08:17PM

13
#93 - captain_morgan / @captain_morgan

09/11/2016 at 06:43PM

13
#94 - Constantine / @ConstantineHatz

09/12/2016 at 05:52PM

13
#95 - Matt Michnal / @mgm702

09/12/2016 at 09:56PM

13
#96 - James / @Dronak

09/13/2016 at 11:56AM

13
#97 - Finn Francis / @FinnFrancis

09/16/2016 at 09:09AM

13
#98 - Rasmus / @SBareSSomErMig

09/16/2016 at 07:40PM

13
#99 - Ameer Ayoub / @magicmeeror

09/16/2016 at 09:36PM

13
#100 - Bendik Samseth / @BSamseth

09/19/2016 at 01:15PM

13
#101 - Allen Gooch / @mojochao

09/20/2016 at 11:39PM

13
#102 - Daniel Bellenger / @DanielBellenger

09/24/2016 at 10:38PM

13
#103 - René De Alvarado / @renedealvarado

09/27/2016 at 12:52PM

13
#104 - Jörg Meyer / @JoergMy

10/01/2016 at 03:57PM

13
#105 - Test User / @TestUserIgnore

10/17/2016 at 08:48PM

13
#106 - John Barbero Unenge / @JBarberU

11/09/2016 at 02:24PM

13
#107 - Saki Gw / @Sakigw

11/10/2016 at 03:32PM

13
#108 - BlackCap / @BlackCapCoder

11/23/2016 at 04:18PM

13
#109 - Richard Mörbitz / @Lodifice

12/08/2016 at 10:50PM

13
#110 - holy_sin / @0zero0

12/16/2016 at 07:50AM

13
#111 - Michał Dytko / @DytkoM

12/20/2016 at 08:31AM

13
#112 - Yann / @yannstad

02/21/2017 at 07:00AM

13
#113 - Mitchell / @Spitchell

03/18/2017 at 04:39PM

13
#114 - Avijit Gupta / @526avijit

03/25/2017 at 06:33AM

13
#115 - caplod / @caplod

03/25/2017 at 07:39PM

13
#116 - Brian Hall / @_bruab_

05/06/2017 at 06:05PM

13
#117 - Rami Hovi / @hacker_lawyer

05/16/2017 at 09:54AM

13
#118 - Chicuella / @chicuellahere

06/06/2017 at 10:55AM

13
#119 - John Smith / @johns32768

06/21/2017 at 05:43PM

13
#120 - Geoff / @RealGeoffErwin

12/18/2017 at 08:30PM