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 51459ef6b94aa50002000002

It's a factor

Flaunt your macro prowess by factoring some numbers. Too hard? It takes less than 30 strokes, I promise.

Start file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
End file
1
1 2
1 3
1 2 4
1 5
1 2 3 6
1 7
1 2 4 8
1 3 9
1 2 5 10
1 11
1 2 3 4 6 12
1 13
1 2 7 14
1 3 5 15
1 2 4 8 16
1 17
1 2 3 6 9 18
1 19
1 2 4 5 10 20

View Diff

2,20c2,20
< 2
< 3
< 4
< 5
< 6
< 7
< 8
< 9
< 10
< 11
< 12
< 13
< 14
< 15
< 16
< 17
< 18
< 19
< 20
---
> 1 2
> 1 3
> 1 2 4
> 1 5
> 1 2 3 6
> 1 7
> 1 2 4 8
> 1 3 9
> 1 2 5 10
> 1 11
> 1 2 3 4 6 12
> 1 13
> 1 2 7 14
> 1 3 5 15
> 1 2 4 8 16
> 1 17
> 1 2 3 6 9 18
> 1 19
> 1 2 4 5 10 20

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 37 remaining solutions by signing in and submitting your own entry
#38 Matt Adelman / @Xavierstein - Score: 150 - 03/21/13 @ 16:20
VGxi1<CR>1 2<CR>1 3<CR>1 2 4<CR>1 5<CR>1 2 3 6<CR>1 7<CR>1 2 4 8<CR>1 3 9<CR>1 2 5 10<CR>1 11<CR>1 2 3 4 6 12<CR>1 13<CR>1 2 7 14<CR>1 3 5 15<CR>1 2 4 8 16<CR>1 17<CR>1 2 3 6 9 18<CR>1 19<CR>1 2 4 5 10 20<Esc>ZZ

0 comments


Created by: @udioica

38 active golfers, 104 entries

Leaderboard (lowest score wins):
24
#1 - wpr__ / @wpr____

03/10/2022 at 03:47AM

24
#2 - John Braxler / @braxler

03/10/2022 at 05:22PM

24
#3 - Peppa Pig / @PeppaPigSg

08/14/2024 at 09:54AM

25
#4 - Urtica dioica / @udioica

11/15/2013 at 02:31AM

25
#5 - 子皓翁 / @geniusgordon

10/25/2016 at 09:11AM

25
#6 - Selvaganapathy P / @canabady

02/19/2021 at 09:49AM

26
#7 - Petro Тrouq / @zulolosi

03/26/2013 at 10:32PM

26
#8 - James Davis / @tripvg

06/28/2013 at 10:48PM

26
#9 - Chaitanya Desu / @ChaituNu

05/11/2014 at 04:02AM

26
#10 - Arbi Tamrazian / @ArbiTamrazian

03/17/2017 at 05:09AM

28
#11 - Kerson Hsiao / @KersonHsiao

03/22/2013 at 02:16AM

28
#12 - Bradd Szonye / @bszonye

07/15/2013 at 07:39AM

29
#13 - László Bácsi / @icanscale

05/06/2013 at 01:14PM

39
#14 - Tyler / @tylerbindon

04/08/2013 at 03:21AM

41
#15 - Ingo / @ist3fani

07/28/2013 at 05:03PM

42
#16 - Evan Shrubsole / @evanshrubsole

03/31/2013 at 08:15PM

50
#17 - sweet.mike.vg / @SweetMikeVg

05/01/2013 at 10:54PM

53
#18 - pftb12345 / @pftb12345

04/18/2015 at 03:22AM

58
#19 - Tim Chase / @gumnos

03/17/2013 at 11:05PM

63
#20 - oliver mueller / @marcontwit

05/21/2013 at 03:11PM

65
#21 - Trevor Powell / @DoomedBunnies

03/19/2013 at 03:07AM

65
#22 - mevmev / @mevmev8

09/22/2021 at 02:20AM

88
#23 - 张文远 / @zhwenyuan

05/20/2013 at 08:04AM

88
#24 - Piotr Śniegowski / @PiotrSniegowski

06/05/2013 at 11:45PM

88
#25 - nickGPT / @nickandbro

08/28/2024 at 06:40PM

89
#26 - Marcin Katulski / @marcink79

03/24/2013 at 01:37PM

92
#27 - Joel Elkins / @dice_tea

03/18/2013 at 05:34AM

92
#28 - brett / @brettyukich

10/01/2013 at 09:14AM

101
#29 - cj / @cj01101

10/18/2013 at 11:00PM

101
#30 - 이종혁 / @BluePaisa

08/30/2020 at 06:12AM