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 109 remaining solutions by signing in and submitting your own entry
#110 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

110 active golfers, 582 entries

Leaderboard (lowest score wins):
23
#31 - わーお / @lwgZVRoOQ8Nf6VG

06/04/2023 at 08:09AM

23
#32 - Игорь Квачёнок / @IKvacenok

06/14/2023 at 12:03PM

23
#33 - naka / @nak38223985244

08/14/2023 at 09:38AM

23
#34 - Vimgolf User / @VimgolfU

10/19/2023 at 08:09AM

23
#35 - shikitanrei / @shikitanrei

02/04/2024 at 02:58AM

25
#36 - moh ayaya / @AyayaMoh

08/17/2023 at 07:58PM

25
#37 - Arey125 / @Arey125

01/18/2024 at 09:44AM

25
#38 - Lennart / @lennartack

04/16/2024 at 11:38AM

26
#39 - Smylers / @Smylers2

06/22/2022 at 05:17PM

26
#40 - 蛙爹 / @Joe53572723

02/19/2023 at 01:56AM

27
#41 - sapir malka / @sapir5522

06/22/2022 at 12:27PM

27
#42 - TimMcGuire / @mcguire

07/09/2022 at 04:07PM

27
#43 - loupiot.veloce / @LoupiotVeloce

07/20/2022 at 03:12PM

27
#44 - Jean Michel Furtado M'Peko / @furtadojean1

10/01/2022 at 11:56PM

27
#45 - 우정민 / @jeongmin2021

10/10/2022 at 04:52PM

28
#46 - Robberechts Arne / @ArneRobberechts

06/22/2022 at 10:45AM

28
#47 - ShookerAndBeta / @Shooker2012

06/24/2022 at 11:32AM

28
#48 - quemeraisc / @quemeraisc

07/04/2022 at 12:36PM

28
#49 - nauj / @nauj_w

07/29/2022 at 03:15PM

28
#50 - Alexander Curtis / @AlexOnCode

03/28/2023 at 10:37AM

28
#51 - Monkey Boy / @monkey29089

09/22/2023 at 01:37PM

29
#52 - ohwell / @KiranClose

08/08/2022 at 12:08PM

29
#53 - vimgolf / @LearnVimGolf

09/28/2022 at 02:53PM

29
#54 - Андрей Куренков (Arey) / @Arey_65536

09/22/2023 at 03:58PM

30
#55 - サイシ / @tairar_314

06/27/2022 at 06:40PM

30
#56 - Jordan Woods / @JordanW09204552

06/09/2023 at 11:41PM

31
#57 - キムラ・OPEL・ユウジ / @kimurayuuji79

09/08/2022 at 03:54AM

31
#58 - João Carvalho / @joaoCarvas

11/28/2022 at 01:59PM

31
#59 - Selvaganapathy P / @canabady

04/17/2023 at 07:28AM

31
#60 - Anaritus / @Anaritus

02/24/2024 at 09:04AM