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 9v0062cda991000000000223

Fizzbuzz

type the first 100 lines of the fizzbuzz problem

Start file

End file
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
Fizzbuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
Fizzbuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
Fizzbuzz
46
47
Fizz
49
Buzz
Fizz
52
53
Fizz
Buzz
56
Fizz
58
59
Fizzbuzz
61
62
Fizz
64
Buzz
Fizz
67
68
Fizz
Buzz
71
Fizz
73
74
Fizzbuzz
76
77
Fizz
79
Buzz
Fizz
82
83
Fizz
Buzz
86
Fizz
88
89
Fizzbuzz
91
92
Fizz
94
Buzz
Fizz
97
98
Fizz
Buzz

View Diff

1,2c1,100
< 
< 
---
> 1
> 2
> Fizz
> 4
> Buzz
> Fizz
> 7
> 8
> Fizz
> Buzz
> 11
> Fizz
> 13
> 14
> Fizzbuzz
> 16
> 17
> Fizz
> 19
> Buzz
> Fizz
> 22
> 23
> Fizz
> Buzz
> 26
> Fizz
> 28
> 29
> Fizzbuzz
> 31
> 32
> Fizz
> 34
> Buzz
> Fizz
> 37
> 38
> Fizz
> Buzz
> 41
> Fizz
> 43
> 44
> Fizzbuzz
> 46
> 47
> Fizz
> 49
> Buzz
> Fizz
> 52
> 53
> Fizz
> Buzz
> 56
> Fizz
> 58
> 59
> Fizzbuzz
> 61
> 62
> Fizz
> 64
> Buzz
> Fizz
> 67
> 68
> Fizz
> Buzz
> 71
> Fizz
> 73
> 74
> Fizzbuzz
> 76
> 77
> Fizz
> 79
> Buzz
> Fizz
> 82
> 83
> Fizz
> Buzz
> 86
> Fizz
> 88
> 89
> Fizzbuzz
> 91
> 92
> Fizz
> 94
> Buzz
> Fizz
> 97
> 98
> Fizz
> Buzz

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 89 remaining solutions by signing in and submitting your own entry
#90 Andrei Pirvan / @PirvanAndrei - Score: 898 - 10/22/22 @ 17:32
<Down><Down><Down><Up><Up><Down><Down>:<50-53>0put=range(1,100)<CR><Esc><Esc>:<50-53>0put=range(1,100)<Esc>[201~<CR><Down><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up>GggGggGggGddddGgg<Esc>:<Up><Home><><Left>50-53<CR><Up>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><CR><Esc>:<Up><Left><Right><Del>)<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS><BS><BS><BS><BS><BS><Del>1<CR>Ggg:p<Up><Up><Esc><Esc><Esc><Up>:<Up><Up><Home><Right><Left><Del><CR><Left><Up><Down><Esc>:<Up><Down><Esc><Esc><Esc>ggG9gG9G9G9G9G8G)G9Ggg<Esc>gg<Esc>gggggg<Esc>.:1,$d<CR>d<BS>dd<Esc>dddd<Esc><Esc>dd<Del><BS><BS>o<BS><BS><BS><BS>dddd<BS><C-D><Esc>dddd<Esc>uuuuuuuu<Esc>:1,$d<Left><Left><Left><Left><Right><BS>2<CR><Esc>u<Up>:<Up><Left><Left><Left><BS>5<CR><Esc>:d<CR><Esc><Esc><Esc>dd<Esc>:$d<CR>dd<Up><Esc>:d<BS><0xc3><0xa5><BS>0p=range(1,19)<CR><Up><Esc>.<Up>:<Up><C-Left><Right><Right>ut<CR><Esc><Esc>:$d<CR><CR>:d<BS>$d<CR>$F.f:F:F.f:D.dD.d<Esc>:<Up><Up><Up><Up><Up><Left><Left><Left><BS>1<BS>+<BS>0<CR>:put<BS><BS><BS>0put=rane<BS>ge(10<BS>,100)<CR>/<BS>_:%s&<BS>%<BS><BS>/\()<Left>\d\{}<Left>1,3\<BS><Right>\<Right>/ <BS>\=submatch(1)&<BS>%15/g<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>s<Right><Right><Right><Right><Right><Right><Right><Right><Right><Del>2G<BS><BS>3<BS><BS>,1<BS><BS><BS>+<BS>0m1<BS><BS>,1<BS><BS><BS>1,2<BS>3<BS><BS><BS>+<BS>+<BS>+<BS>0,1<BS><BS><BS>1,2<BS><BS><BS>1,+<BS>3<CR><Esc><Esc><Esc>:%s/\()<Left>\d<Del><BS><BS><BS><BS><0xe2><0x81><0xb0><BS>^0/Fizzbuzz<CR><Esc>:/<BS>%s/^[369)<BS>]\|12/Fizz/g<CR><Esc>:%s/5|<BS>\|1+<BS>0/Buzz/g<CR>_<Esc>_<Esc>:/<BS>%s/\d//g<CR><Esc>&<BS>%<Esc>/<BS>:/s<BS><BS>%s/    /^<C-Left><C-Left><C-Left><Left><Left><Left><Del><End>/\\<BS>=line('.')/g<CR><Esc><Esc>:%s/\(\d{1,3\}\=<BS>)\(F\<0xc2><0xb1><BS>|<0xc2><0xb1><BS>\B=<BS><BS><BS>B)<Left>\<Right>/\2/g<CR>:/<BS>%s/\(\d\{1,3\}\)\(F}<BS><0xc2><0xb1><BS>|<BS>\<0xc2><0xb1><BS>|B<BS>B<BS>B<BS>\B)<BS><BS><BS>B\)<Left><Left>U<BS>u<BS><Right><Right>/\2/g<CR><Down><Esc>d<Esc><Esc><Esc>GggGdd<Esc>:s<BS>ws<CR><Esc>:q<BS><BS>:w<BS>s<CR><Esc>:q<CR><Esc><Esc>:<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Esc>wq<Esc>:wq<CR>

0 comments


Created by: @Marco73364768

90 active golfers, 270 entries

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

07/14/2022 at 12:54PM

47
#2 - John Braxler / @braxler

07/14/2022 at 01:52PM

47
#3 - Saki Gw / @Sakigw

07/14/2022 at 04:31PM

47
#4 - Jean George / @JeanGeo20504212

07/15/2022 at 12:02AM

47
#5 - Danilo J. S. Bellini / @danilobellini

07/18/2022 at 03:23AM

47
#6 - Irakli Chigvaria / @tchigvaria

07/22/2022 at 06:16AM

47
#7 - Jon Krause / @jkrause314

07/24/2022 at 05:18PM

47
#8 - Александр Черенков / @AleksandrCeren3

07/25/2022 at 04:31AM

47
#9 - Leroy Jenkins / @LeroyJe70429357

09/10/2022 at 11:44PM

47
#10 - Alex Lewin / @_AlexLewin

09/19/2022 at 06:27PM

47
#11 - Topvimgolf Score / @topvimgolfscore

10/11/2022 at 06:13PM

47
#12 - fraktal / @FraktalRebirth

10/19/2022 at 08:17AM

47
#13 - Ekalos / @_Ekalos

11/27/2022 at 11:25AM

48
#14 - Smylers / @Smylers2

07/15/2022 at 12:55PM

48
#15 - vimgolf / @LearnVimGolf

09/27/2022 at 07:54AM

48
#16 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/03/2022 at 09:34AM

56
#17 - heyotetsuo / @heyotetsuo

09/12/2022 at 07:16AM

56
#18 - Yusuf AKIN / @zerdeshtjuan

09/21/2022 at 02:33PM

57
#19 - A A A / @37fatos

10/02/2022 at 05:40PM

57
#20 - Bangash💉💉 / @DevotionGeo

10/11/2022 at 04:41PM

57
#21 - Iron Manders / @MandersIron

10/24/2022 at 04:52PM

57
#22 - Nancho Alvarez / @nancho_alvarez

10/27/2022 at 11:52PM

57
#23 - Marco Meinardi / @chino_meinardi

12/29/2022 at 02:38PM

58
#24 - Vlad Yaglamunov / @VladYaglamunov

10/12/2022 at 02:48PM

59
#25 - satetheus-vimgolf / @SVimgolf

07/19/2022 at 10:34PM

59
#26 - Omar Alawadhi / @OmarAla59544225

09/17/2022 at 10:56AM

61
#27 - Alex / @AlexanderHeatl2

08/26/2022 at 11:52PM

62
#28 - Austin Willliams / @GuitarMusash616

09/23/2022 at 07:19AM

64
#29 - Laughing Cavalier / @jovial_cavalier

10/22/2022 at 06:52PM

65
#30 - cqjxx / @cqjxx1

07/18/2022 at 01:19PM