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):
11
#61 - timerella® / @timerella

11/16/2016 at 11:24PM

11
#62 - Zhihong Liu / @pieapple03

02/15/2017 at 12:42AM

11
#63 - Dimitar Ivanov / @dimisthoughts

03/20/2017 at 12:54AM

11
#64 - Zachary Neubert / @Mr_Saturn16347

03/24/2017 at 12:22AM

11
#65 - Remus Dalrymple / @bornintheflames

05/06/2017 at 11:56PM

11
#66 - Lukas Galke / @_lpag

05/31/2017 at 10:08PM

11
#67 - Ben Hill / @KaizenSoze70

06/30/2017 at 08:58PM

11
#68 - Frank Malone / @FrankMa00268686

07/27/2017 at 12:17PM

11
#69 - SVG / @dotnose5

10/29/2017 at 02:07AM

11
#70 - DHM / @DHM29978992

04/28/2018 at 02:41AM

11
#71 - name / @name65894813

11/25/2018 at 04:18AM

11
#72 - Mihai / @mihaicristiant

12/24/2018 at 06:25PM

11
#73 - Chester Yap / @Chest_ErYap

08/03/2019 at 07:27PM

11
#74 - Lory / @Lory46845742

11/21/2019 at 08:35AM

12
#75 - Chris / @Gaunah_

09/07/2016 at 09:09AM

12
#76 - Igor Czerwinski / @igoratron

10/23/2016 at 01:33PM

12
#77 - Dax / @zacoxi

11/22/2018 at 01:49AM

13
#78 - tPenguinLTG / @tpenguinltg

09/07/2016 at 02:02AM

13
#79 - tgmeng / @lazy_fabric

09/07/2016 at 02:38AM

13
#80 - Cristian Lupașcu / @clupasq

09/07/2016 at 06:43AM

13
#81 - Shivam Sharma / @getshivam

09/07/2016 at 08:19AM

13
#82 - Jan Bundesmann / @janbundesmann

09/07/2016 at 08:28AM

13
#83 - Walker Boh / @walker_boh

09/07/2016 at 08:34AM

13
#84 - Utkrisht Dhankar / @UtkrishtDhankar

09/07/2016 at 08:43AM

13
#85 - イーサン / @metakirby5

09/07/2016 at 09:49AM

13
#86 - Stanislav / @prstad

09/07/2016 at 12:37PM

13
#87 - hor1ace / @hor3ace

09/07/2016 at 01:34PM

13
#88 - Lifepillar / @lifepillar

09/07/2016 at 08:23PM

13
#89 - Winfried Puchinger / @winpuc

09/09/2016 at 09:59AM

13
#90 - 馬 / @uma0124

09/09/2016 at 03:34PM