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 53bddd87dbd3db0002c48c0f

Neither Fizz nor Buzz

Not your regular increment macro! The gaps are tricky.

Start file
0
0
Fizz
0
Buzz
Fizz
0
0
Fizz
Buzz
0
Fizz
0
0
FizzBuzz
End file
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz

View Diff

1,2c1,2
< 0
< 0
---
> 1
> 2
4c4
< 0
---
> 4
7,8c7,8
< 0
< 0
---
> 7
> 8
11c11
< 0
---
> 11
13,14c13,14
< 0
< 0
---
> 13
> 14

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 68 remaining solutions by signing in and submitting your own entry
#69 Tom Richards / the_tomrichards - Score: 22 - 07/10/14 @ 20:39
:%s/0/=<Left>\<End>line('.')<CR>ZZ

0 comments


#70 Florian Duraffourg / fduraffourg - Score: 22 - 07/12/14 @ 07:49
<C-A>u:%s/0/\=line('.')<CR>ZZ

0 comments


#71 Tj / yrddy - Score: 22 - 08/13/14 @ 06:32
:%s/0/\=line('.')/g<CR>ZZ

0 comments


#72 SilentFl / Silent_Fl - Score: 22 - 01/27/15 @ 14:27
:%s/0/\=line('.')/g<CR>ZZ

0 comments


#73 Jeffrey Gu / Jeffrey_Gu - Score: 22 - 03/20/15 @ 17:24
:%s/0/\=line('.')/g<CR>ZZ

0 comments


#74 Josh Gilkerson / JoshGilk - Score: 23 - 07/11/14 @ 17:53
:g/0/s/0/\=line('.')<CR>ZZ

0 comments


#75 Walker Boh / walker_boh - Score: 23 - 10/16/15 @ 15:10
Y:%norm!P<C-A>dd<C-X>".<BS>_ddP<CR>ZZ

0 comments


#76 Paul Rodgers / oursjaune - Score: 24 - 07/10/14 @ 18:39
:%s/0/\=line('.')/<BS><CR>:wq<CR>

0 comments


#77 Carlos A Henríquez Q / lagunex - Score: 29 - 01/18/15 @ 16:04
<C-A>/0<CR>2<C-A>n4<C-A>n7<C-A>n8<C-A>n11<C-A>n13<C-A>n14<C-A>ZZ

0 comments


#78 Dirk Willrodt / DirkWillrodt - Score: 30 - 07/10/14 @ 16:43
<C-A>qaY/0<CR>Vp<C-A>q@a<C-A>@a2<C-A>2@a2<C-A>@a<C-A>@aZZ

0 comments


#79 yamasita taisuke / yaasita - Score: 31 - 07/11/14 @ 12:02
qa:norm <C-R>=line('.')<CR><C-A><CR>/0<CR>q7@aZZ

0 comments


#80 Gurukandhamoorthi / Gurukandhamoor1 - Score: 31 - 08/13/17 @ 16:02
:g/z/s/^/0<CR><C-V>Hg<C-A>:<Up><BS><BS><BS>[0-9]//g<CR>ZZ

0 comments


#81 Ben Turner / phantomwhale - Score: 38 - 07/10/14 @ 04:57
<C-A>j<C-A><C-A>jjr4jjjr7jr8jjjs11<Esc>jjs13<Esc>js14<Esc>:wq<CR>

0 comments


#82 RobertT / techrt2050 - Score: 43 - 07/10/14 @ 05:42
d3Lqq<C-A>yypq13@qddqq3kSFizz<Esc>q3@qjjSBuzz<Esc>5j.ZZ

0 comments


#83 Pamela Ocampo / pmocampo - Score: 52 - 07/11/14 @ 01:02
:14<CR>cw14<Esc>/0<CR>r1<Esc>nr2<Esc>nr4<Esc>nr7<Esc>nr8<Esc>nr1a`<BS>1<Esc>ncw13<Esc>:w<CR>:wq<CR>

0 comments


#84 João Carvalho / joaoCarvas - Score: 56 - 07/11/14 @ 10:08
O1<Esc>qayyjp<C-A>q13@avap:normal J<CR>:%s/ 0//<CR>:%s/[0-9]\+ //<CR>;:x<CR>

0 comments


#85 mko_io / mko_io - Score: 79 - 07/11/14 @ 00:07
xi1jj<BS><BS><Esc>jx2i2<C-O><Esc>4<BS><Esc>4<Esc>:4<CR>xi4<C-O>:7<CR>7xjj<BS><BS><BS><Esc>lx:8<CR>s8<C-C><C-C>:11<CR>s11<C-C><C-C>:13<CR>s13<C-C><C-C>:14<CR>x14i14<C-C><C-C>ZZ

0 comments


Created by: udioica

85 active golfers, 183 entries

Leaderboard (lowest score wins):
13
#1 - Urtica dioica / udioica

06/25/2015 at 06:43PM

13
#2 - John Braxler / braxler

10/14/2015 at 04:15PM

13
#3 - Jon Krause / jkrause314

01/29/2016 at 08:18AM

13
#4 - emblox / emblox

02/29/2016 at 06:07AM

13
#5 - Saki Gw / Sakigw

02/06/2017 at 07:33PM

13
#6 - Turkey Man / lvturkeyman

11/28/2017 at 06:39PM

15
#7 - Tim Chase / gumnos

07/10/2014 at 11:46PM

15
#8 - Petro Тrouq / zulolosi

07/11/2014 at 05:22AM

15
#9 - Pavlo Klets / p01nt

07/15/2014 at 03:37PM

15
#10 - Waylon Cude / waylon531

07/18/2014 at 03:43PM

15
#11 - Birkir Ólafsson / Birkirlafsson

07/21/2014 at 05:38PM

15
#12 - PLS / jaegd

08/16/2014 at 09:59PM

15
#13 - Michael Comerford / MComerford1

09/22/2014 at 02:18AM

15
#14 - Daniel / Daniel00288663

04/05/2017 at 08:53AM

15
#15 - DHM / DHM29978992

05/27/2018 at 03:27AM

16
#16 - Carlos López / morrizon

07/11/2014 at 02:24PM

16
#17 - Lifepillar / lifepillar

07/05/2015 at 04:48PM

20
#18 - Adit Cahya Ramadhan / aditcr8

07/10/2014 at 01:26AM

20
#19 - Caek / Caek_

07/10/2014 at 06:08AM

20
#20 - Edgar Hipp / EdgarHipp

07/10/2014 at 08:28AM

20
#21 - Alexandre Ignjatovic / bankair

07/10/2014 at 08:40AM

20
#22 - Ram Tamtam / ramtamtamtam

07/10/2014 at 09:56AM

20
#23 - Saher El-Neklawy / saherneklawy

07/10/2014 at 10:14AM

20
#24 - b / bprkrprkr

07/11/2014 at 02:03AM

20
#25 - Kerson Hsiao / KersonHsiao

07/11/2014 at 04:42AM

20
#26 - playalong / playwithit42

07/11/2014 at 05:53AM

20
#27 - Garrett Heaver / garrettheaver

07/11/2014 at 11:08AM

20
#28 - Dmitry Teslenko / krab_mozga

07/11/2014 at 12:41PM

20
#29 - Bart / oneofmanybarts

07/11/2014 at 02:25PM

20
#30 - magizbox / rain_1024

07/12/2014 at 11:55PM