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 53d1f9344ab5290002ab30e0

Subtraction

Solve the equations.

Start file
xx - x =
xxx - x =
xxxx - x =
xxxxx - x =
xxxxx - xx =
xxxxxx - xxxxx =
xxxxxxx - xx =
xxxxxxx - xx =
xxxxxxxx - xx =
xxxxxxxx - xxxxx =
xxxxxxxx - xxxxxx =
xxxxxxxxx - xxx =
xxxxxxxxxx - xxxxx =
xxxxxxxxxx - xxxxxxxx =
xxxxxxxxxxx - xxxx =
xxxxxxxxxxx - xxxxx =
xxxxxxxxxxxxx - xxxxxx =
xxxxxxxxxxxxxx - xxx =
xxxxxxxxxxxxxxx - xx =
xxxxxxxxxxxxxxxx - xxxxxxxx =
End file
xx - x = x
xxx - x = xx
xxxx - x = xxx
xxxxx - x = xxxx
xxxxx - xx = xxx
xxxxxx - xxxxx = x
xxxxxxx - xx = xxxxx
xxxxxxx - xx = xxxxx
xxxxxxxx - xx = xxxxxx
xxxxxxxx - xxxxx = xxx
xxxxxxxx - xxxxxx = xx
xxxxxxxxx - xxx = xxxxxx
xxxxxxxxxx - xxxxx = xxxxx
xxxxxxxxxx - xxxxxxxx = xx
xxxxxxxxxxx - xxxx = xxxxxxx
xxxxxxxxxxx - xxxxx = xxxxxx
xxxxxxxxxxxxx - xxxxxx = xxxxxxx
xxxxxxxxxxxxxx - xxx = xxxxxxxxxxx
xxxxxxxxxxxxxxx - xx = xxxxxxxxxxxxx
xxxxxxxxxxxxxxxx - xxxxxxxx = xxxxxxxx

View Diff

1,20c1,20
< xx - x =
< xxx - x =
< xxxx - x =
< xxxxx - x =
< xxxxx - xx =
< xxxxxx - xxxxx =
< xxxxxxx - xx =
< xxxxxxx - xx =
< xxxxxxxx - xx =
< xxxxxxxx - xxxxx =
< xxxxxxxx - xxxxxx =
< xxxxxxxxx - xxx =
< xxxxxxxxxx - xxxxx =
< xxxxxxxxxx - xxxxxxxx =
< xxxxxxxxxxx - xxxx =
< xxxxxxxxxxx - xxxxx =
< xxxxxxxxxxxxx - xxxxxx =
< xxxxxxxxxxxxxx - xxx =
< xxxxxxxxxxxxxxx - xx =
< xxxxxxxxxxxxxxxx - xxxxxxxx =
---
> xx - x = x
> xxx - x = xx
> xxxx - x = xxx
> xxxxx - x = xxxx
> xxxxx - xx = xxx
> xxxxxx - xxxxx = x
> xxxxxxx - xx = xxxxx
> xxxxxxx - xx = xxxxx
> xxxxxxxx - xx = xxxxxx
> xxxxxxxx - xxxxx = xxx
> xxxxxxxx - xxxxxx = xx
> xxxxxxxxx - xxx = xxxxxx
> xxxxxxxxxx - xxxxx = xxxxx
> xxxxxxxxxx - xxxxxxxx = xx
> xxxxxxxxxxx - xxxx = xxxxxxx
> xxxxxxxxxxx - xxxxx = xxxxxx
> xxxxxxxxxxxxx - xxxxxx = xxxxxxx
> xxxxxxxxxxxxxx - xxx = xxxxxxxxxxx
> xxxxxxxxxxxxxxx - xx = xxxxxxxxxxxxx
> xxxxxxxxxxxxxxxx - xxxxxxxx = xxxxxxxx

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 61 remaining solutions by signing in and submitting your own entry
#62 Dan Oneata / @DanOneata - Score: 83 - 07/26/14 @ 09:12
:norem Q "1ywww"2ywA <C-r>=repeat('x',len('<C-r>1')-len('<C-r>2'))<CR><CR>VG:norm Q<CR>ZZ

0 comments


Created by: @Caek_

62 active golfers, 180 entries

Leaderboard (lowest score wins):
23
#31 - booom / @ateukme

08/20/2014 at 11:32PM

23
#32 - Walker Boh / @walker_boh

11/26/2015 at 11:21AM

24
#33 - oliver mueller / @marcontwit

07/25/2014 at 08:38AM

24
#34 - Grigoriy Alexeev / @GrigoriyAlexeev

08/03/2014 at 12:27PM

25
#35 - Marcin Szamotulski / @me_coot

07/27/2014 at 01:02AM

26
#36 - Carlos López / @morrizon

07/26/2014 at 07:00PM

26
#37 - Seth Rader / @f4uLT

08/13/2014 at 06:47PM

26
#38 - April Gentle / @chen327684096

08/24/2014 at 03:38PM

26
#39 - Adrien Canuel / @AdrienCanuel

11/20/2014 at 09:16AM

26
#40 - Not real / @Notreal70353016

10/02/2018 at 07:42PM

27
#41 - Heath Patterson / @HeathPatterson

07/25/2014 at 06:14PM

27
#42 - Spy / @thatspysaspy

07/28/2014 at 05:37PM

27
#43 - mevmev / @mevmev8

10/18/2020 at 07:55PM

28
#44 - Ram Tamtam / @ramtamtamtam

07/25/2014 at 12:06PM

28
#45 - Chris Yuen / @kizzx2

07/26/2014 at 11:58AM

30
#46 - Javier Blanco / @jbgutierrez

07/29/2014 at 10:06PM

30
#47 - Tj / @yrddy

08/13/2014 at 06:19AM

30
#48 - robinro / @robinro

08/19/2014 at 07:09AM

30
#49 - Bill Booth / @ohiopyle

08/19/2014 at 08:16AM

30
#50 - Dmitriy / @_dpy_

08/19/2014 at 06:12PM

30
#51 - eBrnd / @eBrnd

11/02/2014 at 09:15PM

31
#52 - Lieven Keersmaekers / @LievenKeersmaek

07/27/2014 at 04:08PM

31
#53 - madka / @lachrimae_pavan

08/03/2014 at 12:12PM

32
#54 - Dario Avitabile / @tutticapaci

09/08/2014 at 01:17PM

35
#55 - Kai Wood / @kwd_io

07/25/2014 at 07:39AM

35
#56 - Ricardo M. Vilchis / @ajkaanbal

07/25/2014 at 04:33PM

36
#57 - Brendan B Amdocs / @AmdocsB

10/31/2018 at 03:07PM

37
#58 - Gurukandhamoorthi / @Gurukandhamoor1

08/22/2017 at 03:43PM

41
#59 - Florian Duraffourg / @fduraffourg

07/28/2014 at 07:51PM

50
#60 - mindgitrwx / @mindgitrwx

08/09/2020 at 01:42PM