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 4d1ba304c8bb5704eb00012d

Linear congruential generator

http://en.wikipedia.org/wiki/Linear_congruential_generator

Start file
a = 25
b
= 7
m
= 48
x0
= 0
x1
= (a * x0 + b) % m
x2
= (a * x1 + b) % m
...

|
v
End file
a = 25
b
= 7
m
= 48
x0
= 0
x1
= (a * x0 + b) % m
x2
= (a * x1 + b) % m
...

|
v

0
7
38
45
28
35
18
25
8
15
46
5
36
43
26
33
16
23
6
13
44
3
34
41
24
31
14
21
4
11
42
1
32
39
22
29
12
19
2
9
40
47
30
37
20
27
10
17
0

View Diff

11a12,60
> 0
> 7
> 38
> 45
> 28
> 35
> 18
> 25
> 8
> 15
> 46
> 5
> 36
> 43
> 26
> 33
> 16
> 23
> 6
> 13
> 44
> 3
> 34
> 41
> 24
> 31
> 14
> 21
> 4
> 11
> 42
> 1
> 32
> 39
> 22
> 29
> 12
> 19
> 2
> 9
> 40
> 47
> 30
> 37
> 20
> 27
> 10
> 17
> 0

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 51 remaining solutions by signing in and submitting your own entry
#52 Austin Taylor / @austintaylor - Score: 140 - 12/29/10 @ 21:13
Go0<CR>7<CR>38<CR>45<CR>28<CR>35<CR>18<CR>25<CR>8<CR>15<CR>46<CR>5<CR>36<CR>43<CR>26<CR>33<CR>16<CR>23<CR>6<CR>13<CR>44<CR>3<CR>34<CR>41<CR>24<CR>31<CR>14<CR>21<CR>4<CR>11<CR>42<CR>1<CR>32<CR>39<CR>22<CR>29<CR>12<CR>19<CR>2<CR>9<CR>40<CR>47<CR>30<CR>37<CR>20<CR>27<CR>10<CR>17<CR>0<Esc>ZZ

0 comments


#53 Indrek Juhkam / @indrekj - Score: 140 - 12/29/10 @ 21:26
Go0<CR>7<CR>38<CR>45<CR>28<CR>35<CR>18<CR>25<CR>8<CR>15<CR>46<CR>5<CR>36<CR>43<CR>26<CR>33<CR>16<CR>23<CR>6<CR>13<CR>44<CR>3<CR>34<CR>41<CR>24<CR>31<CR>14<CR>21<CR>4<CR>11<CR>42<CR>1<CR>32<CR>39<CR>22<CR>29<CR>12<CR>19<CR>2<CR>9<CR>40<CR>47<CR>30<CR>37<CR>20<CR>27<CR>10<CR>17<CR>0<Esc>ZZ

0 comments


Created by: @kana1

53 active golfers, 142 entries

Leaderboard (lowest score wins):
31
#31 - kmymtksh / @kmymtksh

01/01/2011 at 12:36PM

31
#32 - じょんあば / @john_ababa

03/10/2012 at 02:20PM

31
#33 - Rod Knowlton / @codelahoma

05/27/2012 at 08:09PM

31
#34 - Matt / @mcr05

02/13/2015 at 05:09PM

31
#35 - Brendan B Amdocs / @AmdocsB

10/31/2018 at 05:47PM

32
#36 - uuu / @uu59

12/29/2010 at 09:44PM

33
#37 - James / @Dronak

12/16/2022 at 09:23PM

33
#38 - shahanavaz m / @shahanavazm

01/29/2024 at 03:07AM

34
#39 - Mike Plotz / @antisuji

12/30/2010 at 01:21AM

34
#40 - Aurélien Delahaye / @alkove

01/02/2011 at 01:42AM

34
#41 - Nolen Royalty / @NolenRoyalty

04/23/2012 at 07:39AM

39
#42 - h_east (トロッコ6個) / @h_east

01/17/2011 at 03:27PM

42
#43 - Brent Carmer / @brent_carmer

04/13/2013 at 05:53AM

42
#44 - Hermit McDermot / @hermit_mcdermot

11/13/2015 at 12:39PM

45
#45 - Matthew Draper / @_matthewd

12/30/2010 at 01:24AM

60
#46 - Martin Aumueller / @aumuell

04/25/2012 at 09:42PM

89
#47 - Prody / @Prody225

01/01/2011 at 05:51PM

94
#48 - nickGPT / @nickandbro

08/28/2024 at 11:56PM

95
#49 - mightyfoo / @mightyfoo

05/26/2011 at 02:22PM

105
#50 - kana / @kana1

12/29/2010 at 09:07PM

107
#51 - drio / @drio

01/05/2011 at 01:15PM

140
#52 - Austin Taylor / @austintaylor

12/29/2010 at 09:13PM

140
#53 - Indrek Juhkam / @indrekj

12/29/2010 at 09:26PM