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

69 active golfers, 311 entries

Leaderboard (lowest score wins):
29
#31 - vimgolf / @LearnVimGolf

09/28/2022 at 02:53PM

30
#32 - サイシ / @tairar_314

06/27/2022 at 06:40PM

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

09/08/2022 at 03:54AM

31
#34 - João Carvalho / @joaoCarvas

11/28/2022 at 01:59PM

32
#35 - Cláudio Caseiro / @ccaseiro

07/05/2022 at 02:33AM

32
#36 - jimmarq / @jimmarq

10/28/2022 at 08:12PM

33
#37 - Clmi / @c_decaf

07/11/2022 at 03:31PM

33
#38 - Sahar Rachamim (Kishu) / @SRachamim

09/07/2022 at 08:36PM

33
#39 - Nancho Alvarez / @nancho_alvarez

10/31/2022 at 12:15AM

34
#40 - A White Dwarf / @AWhiteDwarf1

07/06/2022 at 05:52PM

34
#41 - satetheus-vimgolf / @SVimgolf

07/18/2022 at 03:48AM

34
#42 - Leroy Jenkins / @LeroyJe70429357

09/11/2022 at 06:51AM

34
#43 - Nathan Iszlaub / @NIszlaub

10/21/2022 at 04:34PM

34
#44 - qyACvBm9H8 / @QyBm9

12/04/2022 at 01:55AM

35
#45 - mevmev / @mevmev8

07/02/2022 at 08:48PM

36
#46 - Will Long / @WillLon30283972

06/26/2022 at 11:50AM

36
#47 - hacker65536 / @oracle24986322

06/28/2022 at 05:22AM

36
#48 - fraktal / @FraktalRebirth

07/07/2022 at 12:27PM

36
#49 - Alex / @AlexanderHeatl2

08/11/2022 at 07:29PM

36
#50 - bastien batardier / @supercamarche

10/15/2022 at 04:30PM

36
#51 - Laughing Cavalier / @jovial_cavalier

10/22/2022 at 09:45PM

37
#52 - PL Siddharth / @Havok1993

06/27/2022 at 06:41AM

37
#53 - Sean Ye / @seanyezus

07/10/2022 at 09:37PM

38
#54 - Markus / @dayshade_7

07/13/2022 at 01:13PM

38
#55 - 深窓の令嬢@ドクター / @arbino1031

09/09/2022 at 01:53AM

39
#56 - vimgolfer / @vimgolf321

09/19/2022 at 07:48AM

40
#57 - Ratkovszki István / @RatkovszkiIstvn

09/04/2022 at 12:59PM

70
#58 - vuems / @vuems2win

11/11/2022 at 01:54AM

81
#59 - Albert Gouws / @albert_gouws

06/27/2022 at 08:53AM

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

06/28/2022 at 08:01PM