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

67 active golfers, 300 entries

Leaderboard (lowest score wins):
162
#61 - Siddharth Murali / @SidTweetsALess

06/23/2022 at 10:48AM

165
#62 - Bad_Solution_Gen / @Bad_Sols

06/22/2022 at 09:31AM

189
#63 - Jingshan Yin / @Jingshan1989

07/13/2022 at 08:26PM

217
#64 - ChunaiLi / @chunai_li

07/25/2022 at 04:08PM

233
#65 - Alex Lewin / @_AlexLewin

07/11/2022 at 11:29PM

331
#66 - noseskdjs / @nosekxkfkd

06/24/2022 at 07:16AM

332
#67 - Nougatine Naja / @NougatineNaja

06/30/2022 at 10:11AM