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 9v0062b2cb5d000000000222

Substraction (bis)

Solve the equations (adapted from the original @Caek_'s challenge).

Start file
aa - a =
aaa - a =
aaaa - a =
aaaaa - a =
aaaaa - aa =
aaaaaa - aaaaa =
aaaaaaa - aa =
aaaaaaa - aa =
aaaaaaaa - aa =
aaaaaaaa - aaaaa =
aaaaaaaa - aaaaaa =
aaaaaaaaa - aaa =
aaaaaaaaaa - aaaaa =
aaaaaaaaaa - aaaaaaaa =
aaaaaaaaaaa - aaaa =
aaaaaaaaaaa - aaaaa =
aaaaaaaaaaaaa - aaaaaa =
aaaaaaaaaaaaaa - aaa =
aaaaaaaaaaaaaaa - aa =
aaaaaaaaaaaaaaaa - aaaaaaaa =
End file
aa - a = a
aaa - a = aa
aaaa - a = aaa
aaaaa - a = aaaa
aaaaa - aa = aaa
aaaaaa - aaaaa = a
aaaaaaa - aa = aaaaa
aaaaaaa - aa = aaaaa
aaaaaaaa - aa = aaaaaa
aaaaaaaa - aaaaa = aaa
aaaaaaaa - aaaaaa = aa
aaaaaaaaa - aaa = aaaaaa
aaaaaaaaaa - aaaaa = aaaaa
aaaaaaaaaa - aaaaaaaa = aa
aaaaaaaaaaa - aaaa = aaaaaaa
aaaaaaaaaaa - aaaaa = aaaaaa
aaaaaaaaaaaaa - aaaaaa = aaaaaaa
aaaaaaaaaaaaaa - aaa = aaaaaaaaaaa
aaaaaaaaaaaaaaa - aa = aaaaaaaaaaaaa
aaaaaaaaaaaaaaaa - aaaaaaaa = aaaaaaaa

View Diff

1,20c1,20
< aa - a =
< aaa - a =
< aaaa - a =
< aaaaa - a =
< aaaaa - aa =
< aaaaaa - aaaaa =
< aaaaaaa - aa =
< aaaaaaa - aa =
< aaaaaaaa - aa =
< aaaaaaaa - aaaaa =
< aaaaaaaa - aaaaaa =
< aaaaaaaaa - aaa =
< aaaaaaaaaa - aaaaa =
< aaaaaaaaaa - aaaaaaaa =
< aaaaaaaaaaa - aaaa =
< aaaaaaaaaaa - aaaaa =
< aaaaaaaaaaaaa - aaaaaa =
< aaaaaaaaaaaaaa - aaa =
< aaaaaaaaaaaaaaa - aa =
< aaaaaaaaaaaaaaaa - aaaaaaaa =
---
> aa - a = a
> aaa - a = aa
> aaaa - a = aaa
> aaaaa - a = aaaa
> aaaaa - aa = aaa
> aaaaaa - aaaaa = a
> aaaaaaa - aa = aaaaa
> aaaaaaa - aa = aaaaa
> aaaaaaaa - aa = aaaaaa
> aaaaaaaa - aaaaa = aaa
> aaaaaaaa - aaaaaa = aa
> aaaaaaaaa - aaa = aaaaaa
> aaaaaaaaaa - aaaaa = aaaaa
> aaaaaaaaaa - aaaaaaaa = aa
> aaaaaaaaaaa - aaaa = aaaaaaa
> aaaaaaaaaaa - aaaaa = aaaaaa
> aaaaaaaaaaaaa - aaaaaa = aaaaaaa
> aaaaaaaaaaaaaa - aaa = aaaaaaaaaaa
> aaaaaaaaaaaaaaa - aa = aaaaaaaaaaaaa
> aaaaaaaaaaaaaaaa - aaaaaaaa = aaaaaaaa

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 23 remaining solutions by signing in and submitting your own entry
#24 Nougatine Naja / @NougatineNaja - Score: 332 - 06/30/22 @ 10:11
:%s/\v(a*)<Left><Left><Left><Left>^<Right><Right><Right><Right> - a =<BS>\= |<BS>\1<BS><BS>/<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right>(<Right><Right><Right><Right><Right><Right><Right><Right>)<Up><Up><Up><Up><Up><Right><BS>/\1\2\1<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS>\<BS>/<BS><Right><Right><BS><Left>\<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left> <Right><Right><CR>0000nnnnn$xj.u$xj$xj$x<Esc>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>a<CR>n$2xxuuu<C-R>$2Xmnn$2Xj$2Xn$2Xn$2X:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>a<CR>$3Xn$3X:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>a<CR>$4X:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>a<CR>$5Xn$5Xn$5Xn$5X:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right>a<CR>$6Xn$6X:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>aa<CR>$*$8x<Esc>u:<Up><Esc>n<Esc>:<Esc>ww*nnn$8Xn$8XZZ

0 comments


Created by: @JeanGeo20504212

24 active golfers, 57 entries

Leaderboard (lowest score wins):
22
#1 - Saki Gw / @Sakigw

06/22/2022 at 07:10PM

22
#2 - Jean George / @JeanGeo20504212

06/22/2022 at 09:33PM

22
#3 - John Braxler / @braxler

06/23/2022 at 03:31PM

22
#4 - Irakli Chigvaria / @tchigvaria

06/24/2022 at 01:19PM

22
#5 - Jon Krause / @jkrause314

06/26/2022 at 05:04AM

23
#6 - 吴建明 / @pysnow5300

06/24/2022 at 10:33AM

26
#7 - Smylers / @Smylers2

06/22/2022 at 05:17PM

26
#8 - YE / @DeracanthaOnos

07/03/2022 at 06:22AM

27
#9 - sapir malka / @sapir5522

06/22/2022 at 12:27PM

28
#10 - Robberechts Arne / @ArneRobberechts

06/22/2022 at 10:45AM

28
#11 - ShookerAndBeta / @Shooker2012

06/24/2022 at 11:32AM

30
#12 - サイシ / @tairar_314

06/27/2022 at 06:40PM

35
#13 - mevmev / @mevmev8

07/02/2022 at 08:48PM

36
#14 - Will Long / @WillLon30283972

06/26/2022 at 11:50AM

36
#15 - hacker65536 / @oracle24986322

06/28/2022 at 05:22AM

37
#16 - PL Siddharth / @Havok1993

06/27/2022 at 06:41AM

40
#17 - fraktal / @FraktalRebirth

07/03/2022 at 04:08PM

45
#18 - Alex / @AlexanderHeatl2

06/30/2022 at 09:58PM

81
#19 - Albert Gouws / @albert_gouws

06/27/2022 at 08:53AM

81
#20 - Данил / @Danilkirienko81

06/28/2022 at 08:01PM

162
#21 - Siddharth Murali / @SidTweetsALess

06/23/2022 at 10:48AM

165
#22 - Bad_Solution_Gen / @Bad_Sols

06/22/2022 at 09:31AM

331
#23 - noseskdjs / @nosekxkfkd

06/24/2022 at 07:16AM

332
#24 - Nougatine Naja / @NougatineNaja

06/30/2022 at 10:11AM