Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Leaderboard, 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 56 remaining solutions by signing in and submitting your own entry
#57 Trevor Powell / @DoomedBunnies - Score: 38 - 03/20/13 @ 17:13
i1 1<Esc>qqYpl<C-A>q3@qqq4k5Y}p<C-A>j<C-A>j<C-A>j<C-A>j<C-A>q3@qZZ

0 comments

#58 Renat Aksitov / @Korvin79 - Score: 39 - 02/01/12 @ 01: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

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

0 comments

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

0 comments

#61 William Shackleton / @wshackleton - Score: 49 - 01/04/11 @ 09:00
!!echo {1,2,3,4,5}" "{1,2,3,4,5}x<CR>:s/x /\r/g<CR>$xZZ

0 comments

#62 Avinash Baliga / @avinashbaliga - Score: 49 - 03/27/11 @ 21: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

#63 Ricardo Rey / @Changowero - Score: 51 - 06/22/11 @ 08:43
!!echo {1,2,3,4,5}" "{1,2,3,4,5}x<CR>:s/x /|<BS>\r/g<CR>$xZZ

0 comments

#64 sorami / @boredoms - Score: 53 - 04/30/11 @ 16: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

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

0 comments

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

0 comments

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

0 comments

#68 Jan Wedekind / @wedesoft - Score: 104 - 07/13/12 @ 12: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

#69 not so punk :] / @notsopunk - Score: 128 - 06/19/11 @ 03: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

#70 Ayman Farhat / @aymanfarhat - Score: 157 - 05/05/13 @ 08: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

Created by: @kylewillmon

70 active golfers, 160 entries

Leaderboard (lowest score wins):
Default_profile_6_normal
26
#1 - derp derp / @derp__

01/04/2011 at 01:36AM

Dom-50_normal
26
#2 - dominique pellé / @vimgolfisto

01/04/2011 at 01:37AM

Me-small_normal
26
#3 - Wei Dai / @clvv42

01/04/2011 at 04:45PM

Rp_logo_plain_normal
26
#4 - Kevin Webster / @rabidpraxis

01/05/2011 at 12:17AM

The-milky-way-mardi-khola-007_normal
26
#5 - Ujjwol Lamichhane / @Ujjwol

01/07/2011 at 02:45AM

Gravatar_normal
26
#6 - Stephen Morrow / @yawmark

01/26/2011 at 07:00PM

Untitled_normal
26
#7 - vg / @vimgolfer

03/02/2011 at 02:39AM

06j7gfcv1iecx0y418xh_normal
26
#8 - Emile Swarts / @EmileSwarts

06/18/2011 at 09:02AM

Uwe_horns_by_joao_normal
26
#9 - Dave / @zzdave13

07/25/2011 at 07:39AM

Avatar-small_normal
26
#10 - Hu Junfeng / @hujunfeng

07/27/2011 at 05:19AM

Default_profile_2_normal
26
#11 - David / @dpa_92

08/03/2011 at 01:24AM

Gintoki_normal
26
#12 - You-Siang Lin / @yslinnctu

12/03/2011 at 07:21PM

Q6hrg93p4r3hn56thmd0_normal
26
#13 - Urtica dioica / @udioica

06/22/2012 at 02:14PM

Fepic_normal
26
#14 - Federico Galassi / @federicogalassi

07/28/2012 at 02:29AM

Dsc_0096_2_normal
26
#15 - Victor Ramirez / @virako

10/17/2012 at 12:31AM

40051_789281885907_29616532_44170636_2091417_n_normal
26
#16 - Conner McDaniel / @connermcd

11/29/2012 at 09:43AM

E55df1cc7d5fdb4ae9bc2afcb9afe7e4_normal
27
#17 - matthewd / @_matthewd

01/04/2011 at 01:29AM

T_e_normal
28
#18 - Tim Chase / @gumnos

01/04/2011 at 10:56AM

Default_profile_0_normal
30
#19 - Benoît Ryder / @benoitryder

01/04/2011 at 12:05PM

Depthmap_normal
31
#20 - Paul King / @nrocy

01/10/2011 at 10:11PM

89861495_n00_normal
32
#21 - Clément Nodet / @clementnodet

01/04/2011 at 03:56AM

08ed5cbe-a2d2-4503-9503-63d2236b1fba_normal
32
#22 - Soliman Sylvain / @sylvain_soliman

01/04/2011 at 11:46AM

Livesimplytwitter_normal
32
#23 - Marc Lacoursière / @RooSoft

01/04/2011 at 01:19PM

Default_profile_3_normal
32
#24 - Ashish Narasimham / @noxizztenz

01/04/2011 at 06:40PM

1309650785306_normal
32
#25 - Rob Ciaccio / @RobertoCalavera

01/26/2011 at 04:46PM

______normal
32
#26 - (#^ω^)ラムラム / @ramusara

02/15/2011 at 07:35AM

Goatvi3_normal
32
#27 - paulfariello / @paulfariello

03/08/2011 at 04:58AM

Jlove201003sq_normal
32
#28 - Justin Love / @wondible

08/15/2011 at 07:49AM

Firegoji_normal
32
#29 - Vitor Eiji / @vitoreiji0

10/22/2011 at 07:35PM

Default_profile_6_normal
32
#30 - William Dunand / @wdunand

11/17/2011 at 06:52PM

Allah-final_normal
32
#31 - Ibrahim Tencer / @ibrahimtencer

02/12/2012 at 12:52PM

4654945923_eb2c60ee5f_normal
32
#32 - Kerson Hsiao / @KersonHsiao

07/06/2012 at 10:25PM

Default_profile_4_normal
32
#33 - vansan / @VinceVansan

08/28/2012 at 03:11AM

Default_profile_3_normal
33
#34 - aaaa3331 / @aaaa3331

01/04/2011 at 09:19AM

Image_normal
33
#35 - Josh Weinberg / @jcweinberg

01/04/2011 at 10:02PM

South_park_384x384_normal
33
#36 - Adam Pohorecki / @apohorecki

08/08/2011 at 06:09AM

Default_profile_0_normal
34
#37 - Mattiassich Ákos / @mattiassicha

01/03/2011 at 11:55PM

Default_profile_5_normal
34
#38 - pcl / @_pcl

01/04/2011 at 11:53AM

262672_2181022843522_1185476898_32666605_6393658_n_normal
34
#39 - Guillaume Bonnoron / @gbonnoron

01/04/2011 at 01:14PM

L3mo9g2d3jpj7ysqb4iz_normal
34
#40 - Pasha Klets / @p01nt

02/06/2011 at 10:24AM

Default_profile_3_normal
35
#41 - Thom Hughes / @thom_hughes_1

03/28/2011 at 01:40AM

264327_10150230576896345_729061344_7523848_5517118_n_normal
35
#42 - Nolen Royalty / @NolenRoyalty

04/20/2012 at 05:04PM

Default_profile_5_normal
36
#43 - Karel Vervaeke / @karel1980

01/04/2011 at 01:57AM

Gravatar_normal
36
#44 - Asmund Liseth / @Asmund_L

01/04/2011 at 08:16AM

Dbos_normal
36
#45 - Danny O'Sullivan / @db0s

01/05/2011 at 01:05AM

Default_profile_5_normal
36
#46 - Gael / @darkael2

01/06/2011 at 12:41PM

P1000007_normal
37
#47 - h_east (DDD ready) / @h_east

01/04/2011 at 01:17AM

Hrleft_normal
37
#48 - Glenn / @spamcow_moo

01/04/2011 at 11:45AM

Final_normal
37
#49 - Mohammad-Javad Izadi / @mjizadi

01/05/2011 at 05:28AM

Default_profile_0_normal
37
#50 - Nick / @quinks25

01/10/2011 at 04:28PM

Default_profile_3_normal
37
#51 - Przemysław Pawełczyk / @przemoc86

01/15/2011 at 01:29PM

Moi_n_b_normal
37
#52 - sitaktif / @sitaktif

01/17/2011 at 01:09PM

Image_normal
38
#53 - Pete Johns / @johnsyweb

01/08/2011 at 08:53PM

Andrey_ugolnik_180x180_normal
38
#54 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 12:04PM

Default_profile_2_normal
38
#55 - Black Wolf / @LoboVimGolf

06/17/2011 at 09:43AM

Af3be16bb6a6dc7c7061fecdcf97d56b_normal
38
#56 - Vim rocks / @vimrocks

10/11/2012 at 02:27AM

Bunnies_normal
38
#57 - Trevor Powell / @DoomedBunnies

03/20/2013 at 05:13PM

Default_profile_2_normal
39
#58 - Renat Aksitov / @Korvin79

02/01/2012 at 01:28AM

29ed1f20888463b3b72bd9fed88a79b8_normal
44
#59 - drio / @drio

01/16/2011 at 09:06AM

Default_profile_5_normal
45
#60 - dw jdder / @dwjdder

01/11/2011 at 07:43AM

Default_profile_6_normal
49
#61 - William Shackleton / @wshackleton

01/04/2011 at 09:00AM

Default_profile_2_normal
49
#62 - Avinash Baliga / @avinashbaliga

03/27/2011 at 09:11PM

Challenge_normal
51
#63 - Ricardo Rey / @Changowero

06/22/2011 at 08:43AM

Default_profile_0_normal
53
#64 - sorami / @boredoms

04/30/2011 at 04:11PM

Image1326661166_normal
57
#65 - Christopher Brew / @Seph1rothVII

01/12/2012 at 12:56PM

Bc879469f279ee24b7fbdfad7c2216d9_normal
58
#66 - 無ん垢の叫び / @john_ababa

02/24/2012 at 02:23AM

Default_profile_6_normal
72
#67 - Francisco Dibar / @frandibar

01/10/2011 at 09:12PM

Avatar_normal
104
#68 - Jan Wedekind / @wedesoft

07/13/2012 at 12:16PM

122_normal
128
#69 - not so punk :] / @notsopunk

06/19/2011 at 03:36AM

Ec0606cee70c46977da549a1805e6d41_normal
157
#70 - Ayman Farhat / @aymanfarhat

05/05/2013 at 08:33AM