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 4d22bb117f75b01e070000fb

Cartesian product

{1,2,3,4,5} X {1,2,3,4,5}

Start file

End file
1 1
1 2
1 3
1 4
1 5
2 1
2 2
2 3
2 4
2 5
3 1
3 2
3 3
3 4
3 5
4 1
4 2
4 3
4 4
4 5
5 1
5 2
5 3
5 4
5 5

View Diff

1c1,25
< 
---
> 1 1
> 1 2
> 1 3
> 1 4
> 1 5
> 2 1
> 2 2
> 2 3
> 2 4
> 2 5
> 3 1
> 3 2
> 3 3
> 3 4
> 3 5
> 4 1
> 4 2
> 4 3
> 4 4
> 4 5
> 5 1
> 5 2
> 5 3
> 5 4
> 5 5

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 64 remaining solutions by signing in and submitting your own entry
#65 A / Tower_1980 - Score: 38 - 07/29/13 @ 13:25
i1 1<Esc>qqYpl<C-A>q3@qqqV4kyGp<C-A>j<C-A>j<C-A>j<C-A>j<C-A>q3@qZZ

0 comments

#66 James / Dronak - Score: 38 - 09/05/13 @ 21:32
i1 1<Esc>qsYp$<C-A>q3@sqa4k5YGp<C-A>j<C-A>j<C-A>j<C-A>j<C-A>q3@aZZ

0 comments

#67 Renat Aksitov / Korvin79 - Score: 39 - 02/01/12 @ 09:28
i1 1<Esc>qzYp$<C-A>q3@zqz4-5Y4<NL>p<C-A><NL><C-A><NL><C-A><NL><C-A><NL><C-A>q3@zZZ

0 comments

#68 drio / drio - Score: 44 - 01/16/11 @ 17:06
i1 1<Esc>qqYp<C-A>q3@qggqqYp$<C-A>q3@qj4@qj4@qj4@qj4@qZZ

0 comments

#69 dw jdder / dwjdder - Score: 45 - 01/11/11 @ 15:43
i <Esc>:%s:.:& 1\r& 2\r& 3\r& 4\r& 5:|%s:  <CR>@:ZZZ

0 comments

#70 Toto l'haricot / nico_le_terribl - Score: 47 - 11/07/13 @ 12:45
i1 1<Esc>qqYp$<C-A>q3@qqaV4kyGpqqb<C-A>jq4@bqc@a5@bq2@c@cZZ

0 comments

#71 Avinash Baliga / avinashbaliga - Score: 49 - 03/28/11 @ 04:11
i1 1<Esc>qqYpw<C-A>q3@qo2 1<Esc>4@qo3 1<Esc>4@qo4 1<Esc>4@qo5 1<Esc>4@qZZ

0 comments

#72 sorami / boredoms - Score: 53 - 04/30/11 @ 23:11
i1 1<CR>2 1<CR>3 1<CR>4 1<CR>5 1<C-C><C-C>ggqayypw<C-A>q3@aj4@aj4@aj4@aj4@aZZ

0 comments

#73 Christopher Brew / Seph1rothVII - Score: 57 - 01/12/12 @ 20:56
i1 1<Esc>Y24Pllqqj<C-A>j2.j3.j4.jq4@qggqq5j<C-A>5j2.5j3.5j4.19kq4@qZZ

0 comments

#74 無ん垢の叫び / john_ababa - Score: 58 - 02/24/12 @ 10:23
i1 1<Esc>Y4p$r2jr3jr4jr5ygg4P5j<C-V>5jkr25j<C-V>4jr35j<C-V>4jr45j<C-C><C-C><C-V>5jr5ZZ

0 comments

#75 foo / foo88832727 - Score: 61 - 10/19/13 @ 13:53
qq:let l=line('.')<CR>I<C-R>=((l-1)/5+1).' '.(l%5?l%5:5)<CR><CR><Esc>q24@qddZZ

0 comments

#76 Francisco Dibar / frandibar - Score: 72 - 01/11/11 @ 05:12
:for i in range(1,5)|for j in range(1,5)|pu=i.' '.j|endfor|endfor<CR>:1d|x<CR>

0 comments

#77 Jan Wedekind / wedesoft - Score: 104 - 07/13/12 @ 19:16
i12345<Esc>^q1ia<Esc>llq4@1Y4pk:.s/a/1/g<CR>j:<Up><Left><Left><BS>2<CR><Down>:<Up><Left><Left><BS>3<CR><Down>:<Up><Left><Left><BS>4<CR><Down>:<Up><Left><Left><BS>5<CR>1G:%s/\(.\)\(.\)/\1 \2\r/g<CR>:g/^$/d<CR>:wq<CR>

0 comments

#78 not so punk :] / notsopunk - Score: 128 - 06/19/11 @ 10:36
a1 1<Esc>qqyyP<Esc>uq<Esc><Esc>qqyypw<C-A><Esc>q3@q:-4:d<CR><Esc>uG<Esc>uuuuuuuuuuuuuuuuua1 1<Esc>qqYpl<C-A>q3@qqqy4-Gp<Esc>u<Esc><Esc><Esc>a1 1<Esc>qqYpll<C-A>q3@qqqy4-Gp<C-A>+.+.+.+.$q3@qZZ

0 comments

#79 Ayman Farhat / aymanfarhat - Score: 157 - 05/05/13 @ 15:33
1i1 1<CR><BS><CR>1 2<CR>1 3<CR>14<BS> 4<Esc>v<Up><Up><Up><Up><Up><Left><Left><Left>di:<BS><BS><Esc>:set a<BS>paste<CR>i1 1<CR>1 2<CR>1 3<CR>1 4<CR>1 5<CR>2 1<CR>2 2<CR>2 3<CR>2 4<CR>2 5<CR>3 1<CR>3 2<CR>3 3<CR>3 4<CR>3 5<CR>4 1<CR>4 2<CR>4 3<CR>4 4<CR>4 5<CR>5 1<CR>5 2<CR>5 3<CR>5 4<CR>5 5<Esc>:w<CR>:q<CR>

0 comments

#80 Bruce Park / bpark0 - Score: 170 - 07/07/13 @ 03:13
1i1<CR><BS> 1<CR>1 2<CR>1 3<CR>1 4<CR>15<BS> 5<CR>2 1<CR>2 2<CR>2 3<CR>2 4<CR>25<BS> 5<CR>3 1<CR>2 <BS><BS>3 2<CR>3 3<CR>3 4<CR>3 5<CR>4 1<CR>4 2<CR>4 3<CR>4 4<CR>4 5<CR>5 1 <BS><CR>5 2<CR>53<BS> 3<CR>5 4 <BS><CR>5 5<C-Z><BS><C-X><Esc><Right><Left><Right>:quit<CR><C-X>5<Up><Down><Down><Down><Down><Down><Down><Esc><Up><Down>5<Up><Down><Down><Down><Down><Down>o5<BS><BS><BS>5<C-X><C-X>:wq<CR><BS><BS><BS><BS><Esc>:wq<CR>

0 comments

Created by: kylewillmon

80 active golfers, 178 entries

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

10/07/2013 at 08:17PM

24
#2 - John Braxler / braxler

08/19/2014 at 05:57PM

24
#3 - Petro Тrouq / zulolosi

01/03/2015 at 12:58PM

26
#4 - derp derp / derp__

01/04/2011 at 09:36AM

26
#5 - Wei Dai / clvv42

01/05/2011 at 12:45AM

26
#6 - rabidpraxis / rabidpraxis

01/05/2011 at 08:17AM

26
#7 - Ujjwol Lamichhane / Ujjwol

01/07/2011 at 10:45AM

26
#8 - Stephen Morrow / yawmark

01/27/2011 at 03:00AM

26
#9 - vg / vimgolfer

03/02/2011 at 10:39AM

26
#10 - Emile Swarts / EmileSwarts

06/18/2011 at 04:02PM

26
#11 - Dave / zzdave13

07/25/2011 at 02:39PM

26
#12 - Hu Junfeng / junfeng

07/27/2011 at 12:19PM

26
#13 - David / dpa_92

08/03/2011 at 08:24AM

26
#14 - You-Siang Lin / yslinnctu

12/04/2011 at 03:21AM

26
#15 - Federico Galassi / federicogalassi

07/28/2012 at 09:29AM

26
#16 - Victor Ramirez / virako

10/17/2012 at 07:31AM

26
#17 - Conner McDaniel / connermcd

11/29/2012 at 05:43PM

26
#18 - Jon Krause / jkrause314

01/24/2016 at 12:33AM

26
#19 - Foo Bar / foobar01123

06/07/2016 at 04:05PM

27
#20 - Matthew Draper / _matthewd

01/04/2011 at 09:29AM

28
#21 - Tim Chase / gumnos

01/04/2011 at 06:56PM

30
#22 - Benoît Ryder / benoitryder

01/04/2011 at 08:05PM

31
#23 - Paul King / nrocy

01/11/2011 at 06:11AM

31
#24 - Carlos López / morrizon

04/02/2014 at 02:19AM

32
#25 - Clément Nodet / clementnodet

01/04/2011 at 11:56AM

32
#26 - Soliman Sylvain / sylvain_soliman

01/04/2011 at 07:46PM

32
#27 - Marc Lacoursière / RooSoft

01/04/2011 at 09:19PM

32
#28 - Ashish Narasimham / asheeshkabob

01/05/2011 at 02:40AM

32
#29 - Rob Ciaccio / RobertoCalavera

01/27/2011 at 12:46AM

32
#30 - (#^ω^)ラムラム / ramusara

02/15/2011 at 03:35PM

32
#31 - paulfariello ✏️ / paulfariello

03/08/2011 at 12:58PM

32
#32 - Justin Love / wondible

08/15/2011 at 02:49PM

32
#33 - Vitor Eiji / vitoreiji0

10/23/2011 at 02:35AM

32
#34 - William Dunand / wdunand

11/18/2011 at 02:52AM

32
#35 - Ibrahim Tencer / ibrahimtencer

02/12/2012 at 08:52PM

32
#36 - Kerson Hsiao / KersonHsiao

07/07/2012 at 05:25AM

32
#37 - vansan / VinceVansan

08/28/2012 at 10:11AM

32
#38 - zlydem / zlydem

07/02/2013 at 03:33PM

32
#39 - Milind Ganjoo / mganjoo

03/04/2014 at 03:17AM

32
#40 - Juan Luis / rufianw

07/03/2014 at 12:36PM

33
#41 - aaaa3331 / aaaa3331

01/04/2011 at 05:19PM

33
#42 - Josh Weinberg / jcweinberg

01/05/2011 at 06:02AM

33
#43 - Adam Pohorecki / apohorecki

08/08/2011 at 01:09PM

34
#44 - Mattiassich Ákos / mattiassicha

01/04/2011 at 07:55AM

34
#45 - pcl / _pcl

01/04/2011 at 07:53PM

34
#46 - Guillaume Bonnoron / gbonnoron

01/04/2011 at 09:14PM

34
#47 - Pavlo Klets / p01nt

02/06/2011 at 06:24PM

35
#48 - Thom Hughes / thom_hughes_1

03/28/2011 at 08:40AM

35
#49 - Nolen Royalty / NolenRoyalty

04/21/2012 at 12:04AM

35
#50 - RobertT / techrt2050

06/09/2014 at 03:30AM

36
#51 - Karel Vervaeke / karel1980

01/04/2011 at 09:57AM

36
#52 - Asmund / herrasbe

01/04/2011 at 04:16PM

36
#53 - Danny O'Sullivan / db0s

01/05/2011 at 09:05AM

37
#54 - h_east (トロッコ6個) / h_east

01/04/2011 at 09:17AM

37
#55 - Glenn / spamcow_moo

01/04/2011 at 07:45PM

37
#56 - Mohammad-Javad Izadi / mjizadi

01/05/2011 at 01:28PM

37
#57 - Nick / quinks25

01/11/2011 at 12:28AM

37
#58 - Przemysław Pawełczyk / przemoc86

01/15/2011 at 09:29PM

37
#59 - sitaktif / sitaktif

01/17/2011 at 09:09PM

38
#60 - Pete Johns / johnsyweb

01/09/2011 at 04:53AM

38
#61 - Andrey A. Ugolnik / andreyugolnik

01/19/2011 at 08:04PM

38
#62 - Black Wolf / LoboVimGolf

06/17/2011 at 04:43PM

38
#63 - Vim rocks / vimrocks

10/11/2012 at 09:27AM

38
#64 - Trevor Powell / DoomedBunnies

03/21/2013 at 12:13AM

38
#65 - A / Tower_1980

07/29/2013 at 01:25PM

38
#66 - James / Dronak

09/05/2013 at 09:32PM

39
#67 - Renat Aksitov / Korvin79

02/01/2012 at 09:28AM

44
#68 - drio / drio

01/16/2011 at 05:06PM

45
#69 - dw jdder / dwjdder

01/11/2011 at 03:43PM

47
#70 - Toto l'haricot / nico_le_terribl

11/07/2013 at 12:45PM

49
#71 - Avinash Baliga / avinashbaliga

03/28/2011 at 04:11AM

53
#72 - sorami / boredoms

04/30/2011 at 11:11PM

57
#73 - Christopher Brew / Seph1rothVII

01/12/2012 at 08:56PM

58
#74 - 無ん垢の叫び / john_ababa

02/24/2012 at 10:23AM

61
#75 - foo / foo88832727

10/19/2013 at 01:53PM

72
#76 - Francisco Dibar / frandibar

01/11/2011 at 05:12AM

104
#77 - Jan Wedekind / wedesoft

07/13/2012 at 07:16PM

128
#78 - not so punk :] / notsopunk

06/19/2011 at 10:36AM

157
#79 - Ayman Farhat / aymanfarhat

05/05/2013 at 03:33PM

170
#80 - Bruce Park / bpark0

07/07/2013 at 03:13AM