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 54cb9296b2df9e000307809a

Winning streak

Make the number on each line equal the consecutive L's or W's.

Start file
W 1
W 1
W 1
L 1
L 1
W 1
L 1
L 1
L 1
W 1
W 1
W 1
L 1
W 1
W 1
W 1
W 1
L 1
L 1
L 1
End file
W 1
W 2
W 3
L 1
L 2
W 1
L 1
L 2
L 3
W 1
W 2
W 3
L 1
W 1
W 2
W 3
W 4
L 1
L 2
L 3

View Diff

2,4c2,3
< W 1
< W 1
< L 1
---
> W 2
> W 3
5a5
> L 2
8,11c8,9
< L 1
< L 1
< W 1
< W 1
---
> L 2
> L 3
12a11,12
> W 2
> W 3
15,19c15,17
< W 1
< W 1
< W 1
< L 1
< L 1
---
> W 2
> W 3
> W 4
20a19,20
> L 2
> L 3

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 32 remaining solutions by signing in and submitting your own entry
#33 Peter Flockhart / FreshPeter_ - Score: 38 - 02/26/15 @ 17:36
j<C-A>j<C-A><C-A>2j.3j.j..2j.j..3j.j..j...2j.j..ZZ

0 comments

#34 Ruslan / DarkhanRus - Score: 38 - 03/27/15 @ 17:14
j<C-A>j..jj.3j.j..2j.j..3j.j..j...jj.j..ZZ

0 comments

#35 Joel Gallant / joelg236 - Score: 39 - 08/08/15 @ 16:40
wj<C-A>j..2j.3j.j..2j.j..3j.j..j...2j.j2.ZZ

0 comments

#36 Lieven Keersmaekers / LievenKeersmaek - Score: 40 - 01/30/15 @ 18:40
j<C-A>j2.2j.<C-X>2jj<C-A>j<C-A><C-A>jj<C-A>j<C-A><C-A>2jj<C-A>j2<C-A>j3<C-A>jj<C-A>j<C-A><C-A>ZZ

0 comments

#37 Naseem Al-Naji / NaseemAlnaji - Score: 40 - 02/14/15 @ 02:07
j<C-A>j<C-A><C-A>jj<C-A>3j<C-A>j<C-A><C-A>jj<C-A>j<C-A><C-A>jjj<C-A>j<C-A><C-A>j3<C-A>jj<C-A>j<C-A><C-A>:wq<CR>

0 comments

#38 Thiago Prado / 5k1pp3r - Score: 40 - 03/11/15 @ 17:42
$j<C-A>j2<C-A>jj<C-A>jjj<C-A>j2<C-A>jj<C-A>j2<C-A>jjj<C-A>j2<C-A>j3<C-A>jj<C-A>j2<C-A>ZZ

0 comments

#39 ZC-死理性派 / zecyzhang - Score: 41 - 01/30/15 @ 17:40
:%s/\v(.) (.)\n\1 \zs./\=submatch(2)+1<CR>ZZ

gumnos: This was my first solution, as I like a good Ex-mode answer.

1 comment

#40 Larry Battle / LarryBattle - Score: 41 - 02/01/15 @ 07:54
j$<C-A>j<C-A><C-A>jj<C-A>jjj<C-A>j<C-A><C-A>jj<C-A>j<C-A><C-A>jjj<C-A>j<C-A><C-A>j<C-A><C-A><C-A>jj<C-A>j<C-A><C-A>ZZ

0 comments

#41 Daniel V Stankevich / standeo - Score: 42 - 02/05/15 @ 07:59
j<C-A>j2.jj1.3j1.j2.jj1.j2.3j1.j2.j3.jj1.j2.ZZ

0 comments

Created by: udioica

41 active golfers, 90 entries

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

02/01/2015 at 12:56AM

21
#2 - John Braxler / braxler

02/04/2015 at 06:15PM

22
#3 - kimber gonzalez / kimberlycreates

02/02/2015 at 07:30PM

23
#4 - Petro Тrouq / zulolosi

02/01/2015 at 06:17AM

25
#5 - Carlos López / morrizon

02/04/2015 at 06:08PM

26
#6 - Tim Chase / gumnos

01/30/2015 at 06:23PM

26
#7 - Matthieu Crapet / mcr05

01/31/2015 at 12:54PM

26
#8 - Pedro Santos / pedrosans

02/03/2015 at 03:09PM

26
#9 - Michi Loro / michiloro

02/04/2015 at 12:42PM

26
#10 - Jeremie / jermoer

02/06/2015 at 04:52AM

26
#11 - Nolic / cNolic

02/12/2015 at 05:25PM

26
#12 - xieyh11 / xieyh11

02/13/2015 at 04:54AM

26
#13 - Carlos A Henríquez Q / lagunex

02/14/2015 at 11:44PM

26
#14 - Michael Giuffrida / mgiuffrida

02/24/2015 at 04:43AM

26
#15 - Ben Plantinga / benplantinga

03/05/2015 at 06:53AM

26
#16 - pftb12345 / pftb12345

04/07/2015 at 05:37AM

26
#17 - Walker Boh / walker_boh

11/05/2015 at 03:59PM

26
#18 - Jon Krause / jkrause314

01/24/2016 at 01:34AM

27
#19 - Dane Summers / dsummersl

01/31/2015 at 03:50AM

27
#20 - いっこつ / eZb4

02/03/2015 at 06:56PM

27
#21 - César Enrique / caenrique93

02/03/2015 at 11:02PM

27
#22 - Robin Moussu / robin_moussu

03/30/2015 at 11:07AM

27
#23 - Robert Goeddel / f0rdpr3fect

11/11/2015 at 11:39PM

29
#24 - Terence Hang / technic_tec

02/13/2015 at 08:45AM

30
#25 - Hans Liu / zhansliu

01/30/2015 at 04:07PM

34
#26 - Andrew Joe / andrewajoe

02/01/2015 at 06:20AM

35
#27 - Deepak Surti / dmsurti

03/18/2015 at 09:03PM

36
#28 - 裏連 / uraren_bot

02/02/2015 at 07:20AM

36
#29 - chvzvhn / chvzvhn

03/30/2015 at 07:46PM

37
#30 - Jake Eskel / JakeEskel

02/03/2015 at 11:46PM

37
#31 - Oliver Christ / 0liverChrist

02/06/2015 at 11:48PM

37
#32 - Roberto Carraretto / robcarraretto

01/27/2016 at 11:15PM

38
#33 - Peter Flockhart / FreshPeter_

02/26/2015 at 05:36PM

38
#34 - Ruslan / DarkhanRus

03/27/2015 at 05:14PM

39
#35 - Joel Gallant / joelg236

08/08/2015 at 04:40PM

40
#36 - Lieven Keersmaekers / LievenKeersmaek

01/30/2015 at 06:40PM

40
#37 - Naseem Al-Naji / NaseemAlnaji

02/14/2015 at 02:07AM

40
#38 - Thiago Prado / 5k1pp3r

03/11/2015 at 05:42PM

41
#39 - ZC-死理性派 / zecyzhang

01/30/2015 at 05:40PM

41
#40 - Larry Battle / LarryBattle

02/01/2015 at 07:54AM

42
#41 - Daniel V Stankevich / standeo

02/05/2015 at 07:59AM