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 5d010a4fcb4b5c000927f42a

If-then-else regexp

Rules: - golf is never following golf - vim comes first! Drawing a finite-state machine diagram could help. #regexp

Start file
vim
golf
vimvim
vimgolf
golfvim
golfgolf
vimvimvim
vimvimgolf
vimgolfvim
vimgolfgolf
golfvimvim
golfvimgolf
golfgolfvim
golfgolfgolf
vimvimvimvim
vimvimvimgolf
vimvimgolfvim
vimvimgolfgolf
vimgolfvimvim
vimgolfvimgolf
vimgolfgolfvim
vimgolfgolfgolf
golfvimvimvim
golfvimvimgolf
golfvimgolfvim
golfvimgolfgolf
golfgolfvimvim
golfgolfvimgolf
golfgolfgolfvim
golfgolfgolfgolf
vimvimvimvimvim
vimvimvimvimgolf
vimvimvimgolfvim
vimvimvimgolfgolf
vimvimgolfvimvim
vimvimgolfvimgolf
vimvimgolfgolfvim
vimvimgolfgolfgolf
vimgolfvimvimvim
vimgolfvimvimgolf
vimgolfvimgolfvim
vimgolfvimgolfgolf
vimgolfgolfvimvim
vimgolfgolfvimgolf
vimgolfgolfgolfvim
vimgolfgolfgolfgolf
golfvimvimvimvim
golfvimvimvimgolf
golfvimvimgolfvim
golfvimvimgolfgolf
golfvimgolfvimvim
golfvimgolfvimgolf
golfvimgolfgolfvim
golfvimgolfgolfgolf
golfgolfvimvimvim
golfgolfvimvimgolf
golfgolfvimgolfvim
golfgolfvimgolfgolf
golfgolfgolfvimvim
golfgolfgolfvimgolf
golfgolfgolfgolfvim
golfgolfgolfgolfgolf
vimvimvimvimvimvim
vimvimvimvimvimgolf
vimvimvimvimgolfvim
vimvimvimvimgolfgolf
vimvimvimgolfvimvim
vimvimvimgolfvimgolf
vimvimvimgolfgolfvim
vimvimvimgolfgolfgolf
End file
yes
no
yes
no
no
no
yes
yes
no
no
no
no
no
no
yes
yes
yes
no
no
no
no
no
no
no
no
no
no
no
no
no
yes
yes
yes
no
yes
yes
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
yes
yes
yes
no
yes
yes
no
no

View Diff

1,70c1,70
< vim
< golf
< vimvim
< vimgolf
< golfvim
< golfgolf
< vimvimvim
< vimvimgolf
< vimgolfvim
< vimgolfgolf
< golfvimvim
< golfvimgolf
< golfgolfvim
< golfgolfgolf
< vimvimvimvim
< vimvimvimgolf
< vimvimgolfvim
< vimvimgolfgolf
< vimgolfvimvim
< vimgolfvimgolf
< vimgolfgolfvim
< vimgolfgolfgolf
< golfvimvimvim
< golfvimvimgolf
< golfvimgolfvim
< golfvimgolfgolf
< golfgolfvimvim
< golfgolfvimgolf
< golfgolfgolfvim
< golfgolfgolfgolf
< vimvimvimvimvim
< vimvimvimvimgolf
< vimvimvimgolfvim
< vimvimvimgolfgolf
< vimvimgolfvimvim
< vimvimgolfvimgolf
< vimvimgolfgolfvim
< vimvimgolfgolfgolf
< vimgolfvimvimvim
< vimgolfvimvimgolf
< vimgolfvimgolfvim
< vimgolfvimgolfgolf
< vimgolfgolfvimvim
< vimgolfgolfvimgolf
< vimgolfgolfgolfvim
< vimgolfgolfgolfgolf
< golfvimvimvimvim
< golfvimvimvimgolf
< golfvimvimgolfvim
< golfvimvimgolfgolf
< golfvimgolfvimvim
< golfvimgolfvimgolf
< golfvimgolfgolfvim
< golfvimgolfgolfgolf
< golfgolfvimvimvim
< golfgolfvimvimgolf
< golfgolfvimgolfvim
< golfgolfvimgolfgolf
< golfgolfgolfvimvim
< golfgolfgolfvimgolf
< golfgolfgolfgolfvim
< golfgolfgolfgolfgolf
< vimvimvimvimvimvim
< vimvimvimvimvimgolf
< vimvimvimvimgolfvim
< vimvimvimvimgolfgolf
< vimvimvimgolfvimvim
< vimvimvimgolfvimgolf
< vimvimvimgolfgolfvim
< vimvimvimgolfgolfgolf
---
> yes
> no
> yes
> no
> no
> no
> yes
> yes
> no
> no
> no
> no
> no
> no
> yes
> yes
> yes
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> yes
> yes
> yes
> no
> yes
> yes
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> no
> yes
> yes
> yes
> no
> yes
> yes
> no
> no

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 13 remaining solutions by signing in and submitting your own entry
#14 Miłosz Łakomy / @foobar01123 - Score: 56 - 06/26/19 @ 10:38
<C-V>}cno<Esc>cawyes<Esc><CR><CR>.4<CR>.<CR>.7<CR>.<CR>.<CR>.14<CR>.<CR>.<CR>.<CR><CR>.<CR>.27<CR>.<CR>.<CR>.<CR><CR>.<CR>.ZZ

0 comments


Created by: @mcr05

14 active golfers, 53 entries

Leaderboard (lowest score wins):
37
#1 - Alexey Vyskubov / @avysk

06/13/2019 at 09:50AM

37
#2 - Saki Gw / @Sakigw

06/13/2019 at 11:43AM

37
#3 - John Braxler / @braxler

06/13/2019 at 12:40PM

37
#4 - Smylers / @Smylers2

06/13/2019 at 04:17PM

37
#5 - james_bunch / @james_bunch

06/13/2019 at 11:07PM

37
#6 - moh ayaya / @AyayaMoh

09/08/2023 at 04:50PM

37
#7 - Aly Thobani / @alythobani

05/31/2024 at 12:44AM

37
#8 - Peppa Pig / @PeppaPigSg

07/02/2024 at 07:15AM

37
#9 - nickGPT / @nickandbro

08/24/2024 at 03:03PM

38
#10 - Jon Krause / @jkrause314

06/13/2019 at 05:49AM

38
#11 - Petru-Armand Bancila / @petruarmand

07/09/2019 at 10:43PM

38
#12 - Luoyb / @Luoyb

10/30/2023 at 01:18AM

46
#13 - Ivo Blöchliger / @aigledesalpes

08/07/2019 at 06:42PM

56
#14 - Miłosz Łakomy / @foobar01123

06/26/2019 at 10:38AM