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):
18
#1 - Urtica dioica / @udioica

07/25/2014 at 10:12AM

18
#2 - Birkir Ólafsson / @Birkirlafsson

07/25/2014 at 08:18PM

18
#3 - Petro Тrouq / @zulolosi

07/26/2014 at 04:29AM

18
#4 - Adit Cahya Ramadhan / @aditcr8

07/27/2014 at 01:19AM

18
#5 - Maximiliano Padulo / @mpadulo

07/29/2014 at 09:04AM

18
#6 - John Braxler / @braxler

07/29/2014 at 02:40PM

18
#7 - Caek / @Caek_

09/19/2014 at 12:16AM

18
#8 - Rui Mendes / @rcm_dium

05/02/2015 at 01:25PM

18
#9 - Peppa Pig / @PeppaPigSg

08/09/2024 at 01:00AM

19
#10 - John Meisner / @jmeisned

07/25/2014 at 08:31PM

19
#11 - ———đίxίє—flαтlίиє——— / @_dixie_flatline

08/15/2014 at 06:47PM

19
#12 - Saki Gw / @Sakigw

01/23/2017 at 12:00AM

19
#13 - Turkey Man / @lvturkeyman

12/07/2017 at 10:13AM

19
#14 - int@紅ぽよ / @int_cl

08/15/2020 at 07:44PM

19
#15 - Michel Viktor / @tomkpz

08/02/2021 at 03:32AM

19
#16 - Jean George / @JeanGeo20504212

06/22/2022 at 07:41AM

19
#17 - Alex / @AlexanderHeatl2

08/30/2022 at 04:41PM

20
#18 - Bambu / @bambumandinga

07/30/2014 at 12:47AM

20
#19 - Jeff / @just_geophree

09/13/2014 at 10:05PM

22
#20 - Kerson Hsiao / @KersonHsiao

07/25/2014 at 07:30AM

22
#21 - Kai Yuan / @kentyuan

07/25/2014 at 09:12AM

22
#22 - Pete Johns / @johnsyweb

07/26/2014 at 04:57AM

22
#23 - Michi Loro / @michiloro

07/28/2014 at 11:24AM

22
#24 - vimgolf copycat / @vimgolf_copycat

07/28/2014 at 04:27PM

22
#25 - gybilis / @gybilis

07/29/2014 at 08:38PM

22
#26 - kemar / @le_kemar

08/22/2014 at 12:24PM

22
#27 - Matt / @mcr05

02/27/2015 at 02:07PM

22
#28 - pftb12345 / @pftb12345

04/11/2015 at 03:45PM

22
#29 - loupiot.veloce / @LoupiotVeloce

07/20/2022 at 03:41PM

23
#30 - Marco Biasini / @biasmv

07/27/2014 at 05:45PM