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 by @paulsmolloy:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @kana1

52 active golfers, 137 entries

Solutions by @paulsmolloy:
28
#4 - Paul Molloy / @paulsmolloy

10/29/2023 at 11:29AM

29
#>5 - Paul Molloy / @paulsmolloy

05/02/2024 at 06:59AM

30
#>29 - Paul Molloy / @paulsmolloy

10/29/2023 at 11:16AM

31
#>34 - Paul Molloy / @paulsmolloy

10/29/2023 at 11:13AM

38
#>40 - Paul Molloy / @paulsmolloy

10/29/2023 at 11:12AM

95
#>48 - Paul Molloy / @paulsmolloy

10/29/2023 at 08:28AM

105
#>49 - Paul Molloy / @paulsmolloy

10/29/2023 at 08:23AM

106
#>49 - Paul Molloy / @paulsmolloy

10/29/2023 at 08:20AM

140
#>52 - Paul Molloy / @paulsmolloy

10/29/2023 at 08:12AM

142
#>52 - Paul Molloy / @paulsmolloy

05/01/2024 at 03:48PM

284
#>52 - Paul Molloy / @paulsmolloy

10/28/2023 at 07:25PM

526
#>52 - Paul Molloy / @paulsmolloy

10/28/2023 at 04:09PM

2398
#>52 - Paul Molloy / @paulsmolloy

10/28/2023 at 04:00PM