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

Create a pandoc compatible table

In [this vimcast][1], a featured gist from Tim Pope shows how to quickly make a simple table structure. How fast can you convert it to pandoc's markdown style? [1]: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/

Start file
| This  | Is    | A Table   | Example     |
| I'm   | going | to        | fill        |
| it    | with  | random    | information |
| just  | to    | save      | me          |
| time. | In    | the       | spirit      |
| of    | vim   | I         | am          |
| quite | often | extremely | lazy.       |
End file
This   Is     A Table    Example
-----  -----  ---------  -----------
I'm    going  to         fill
it     with   random     information
just   to     save       me
time.  In     the        spirit
of     vim    I          am
quite  often  extremely  lazy.

View Diff

1,7c1,8
< | This  | Is    | A Table   | Example     |
< | I'm   | going | to        | fill        |
< | it    | with  | random    | information |
< | just  | to    | save      | me          |
< | time. | In    | the       | spirit      |
< | of    | vim   | I         | am          |
< | quite | often | extremely | lazy.       |
---
> This   Is     A Table    Example
> -----  -----  ---------  -----------
> I'm    going  to         fill
> it     with   random     information
> just   to     save       me
> time.  In     the        spirit
> of     vim    I          am
> quite  often  extremely  lazy.

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 Oliver Mader / @dotb52 - Score: 64 - 07/17/12 @ 00:33
:%s/^| \||\|\s\+|$//g<CR>1Go-----  -----  ---------  -----------<Esc>ZZ

0 comments

#34 mnx / @mnxx - Score: 65 - 06/05/12 @ 15:05
YpV:s/[^|]/-/g<CR>k<C-V>Gx.w.ww.www.ww..w5lR  <Esc>6lR  <Esc>9llR  <Esc>:%s/ *$<CR>.uZZ

0 comments

#35 ise0615 / @ise0615 - Score: 69 - 06/14/12 @ 22:28
<C-V>Gld:%s/|//g<CR>:<Up><Left><Left><Left><C-H> *$<CR>ggjko<Tab><C-H>-----  -----  ---------  -----------<Esc>ZZ

0 comments

#36 Mikael Engström / @mikaelengstrom - Score: 74 - 06/05/12 @ 07:07
:%s/\s*.$/<CR>d<C-V>2go:3t<CR>:3t.<CR>Vr-kt|<C-V>7jllr u<C-V>Gf|lc  <Esc>;.;.uuut|jkt|t|jkt|.;.;.ZZ

0 comments

#37 Jason Felice / @eraserhd - Score: 76 - 06/19/12 @ 16:05
:a<CR>-----  -----  ---------  -----------<CR>.<CR>:%s/| //<CR>:%s/| / /g<CR>:%s/ *|//<CR>:wq<CR>

0 comments

#38 Jan Wedekind / @wedesoft - Score: 81 - 07/13/12 @ 11:59
:%<Esc><Esc>yyp:.s/[^|]/ /<BS><BS>-/g<CR>:.s/|-/| /g<CR>:<Up><Left><Left><BS><Left> <Left><Left><BS><Left>-<CR>:%s/|//g<CR>:%s/^ //<CR>:%s/ *$//<CR>:wq<CR>

0 comments

#39 tea_sea / @tea_sea - Score: 81 - 10/09/12 @ 16:56
:%s/|//g<CR>:<Up><Left><Left><Left><BS>^\s*<CR>:<Up><Left><Left><Left><Left><Left><Left><BS><Right><Right><Right>$<CR>:<CR>jggo<Esc>11i-<Esc>0i  <Esc>05<BS>0j9i-<Esc>0i  <Left><Left><Esc>5i-<Esc>0.a  <Esc>:wq<CR>

0 comments

#40 Angela Harms / @angelaharms - Score: 84 - 06/19/12 @ 16:08
:%s/|//g<BS>g<CR>:%/<BS>s/^ //h<BS><CR>:%s/\s\+$/<CR>:1a<CR>:<BS>-----  -----  ---------  -----------<CR>.<CR>:wq<CR>

0 comments

Created by: @connermcd

40 active golfers, 122 entries

Leaderboard (lowest score wins):
Q6hrg93p4r3hn56thmd0_normal
32
#1 - Urtica dioica / @udioica

06/06/2012 at 03:16PM

40051_789281885907_29616532_44170636_2091417_n_normal
32
#2 - Conner McDaniel / @connermcd

06/06/2012 at 04:40PM

Default_profile_0_normal
32
#3 - Sergey / @sav86

06/11/2012 at 10:43PM

Mobile_photo_mar_15__2010_12_39_49_normal
32
#4 - Rod Knowlton / @codelahoma

06/12/2012 at 03:46AM

Southpark-resized_normal
32
#5 - David / @ebonhand09

06/12/2012 at 04:25AM

Ich_normal
32
#6 - Daniel S / @smatter0ne

07/15/2012 at 05:36PM

06j7gfcv1iecx0y418xh_normal
32
#7 - Emile Swarts / @EmileSwarts

08/19/2012 at 10:19AM

T_e_normal
33
#8 - Tim Chase / @gumnos

06/05/2012 at 03:38AM

Img_0812_normal
33
#9 - Aaron Lake / @metallikop

06/05/2012 at 05:28AM

Default_profile_3_normal
33
#10 - James Davis / @tripvg

08/04/2012 at 02:05PM

Jlove201003sq_normal
34
#11 - Justin Love / @wondible

06/05/2012 at 07:09AM

Default_profile_1_normal
36
#12 - Benson Kim / @BensonRLA

06/06/2012 at 02:45AM

Default_profile_3_normal
36
#13 - Édouard M'tou / @DouardM

10/09/2012 at 09:27AM

Jbgutierrez_normal
37
#14 - Javier Blanco / @jbgutierrez

06/06/2012 at 03:40PM

4654945923_eb2c60ee5f_normal
37
#15 - Kerson Hsiao / @KersonHsiao

08/04/2012 at 09:05AM

312189_10150481221796258_700041257_11172966_434509532_n_normal
37
#16 - Sean Griffin / @sgrif

08/12/2012 at 06:57PM

P1000007_normal
40
#17 - h_east (DDD ready) / @h_east

06/06/2012 at 02:07AM

Default_profile_0_normal
42
#18 - Benoit Mortgat / @Benoit_Mortgat

06/04/2012 at 10:17PM

12__2_normal
42
#19 - Marcin Owerczuk / @marcinowerczuk

06/13/2012 at 12:46AM

Image_normal
43
#20 - Raúl Jara / @rauljara

07/09/2012 at 05:47PM

Default_profile_6_normal
44
#21 - William Dunand / @wdunand

07/27/2012 at 12:56AM

Default_profile_0_normal
46
#22 - Pandae / @psasqw

06/21/2012 at 06:43AM

Bc879469f279ee24b7fbdfad7c2216d9_normal
47
#23 - 無ん垢の叫び / @john_ababa

06/08/2012 at 08:14AM

187559_1578484375_479499_n_normal
47
#24 - Steven Occhipinti / @steveocchipinti

06/11/2012 at 08:10PM

Image005_normal
47
#25 - J Paul Daigle / @jpauldaigle

06/16/2012 at 04:53AM

Default_profile_4_normal
49
#26 - Dil / @dilpun

06/08/2012 at 07:19AM

Knittingstash_240dpi_72x72_normal
49
#27 - Underhill Labs / @underhilllabs

10/29/2012 at 10:05PM

Default_profile_0_normal
50
#28 - shutl_test / @shutl_test

06/06/2012 at 02:00PM

Default_profile_4_normal
50
#29 - vimgolf dp / @DpVimgolf

06/12/2012 at 03:09PM

2c68d2a7e6b253e55d7ded4abb4710d1_normal
50
#30 - Yann Moisan / @YannMoisan

01/26/2013 at 12:17AM

Default_profile_0_normal
52
#31 - Ilya Ermolin / @ermolinis

06/21/2012 at 12:26AM

Self-avatar-2009_normal
57
#32 - John Whitley / @johnwhitley

06/05/2012 at 09:02AM

Default_profile_3_normal
64
#33 - Oliver Mader / @dotb52

07/17/2012 at 12:33AM

Default_profile_4_normal
65
#34 - mnx / @mnxx

06/05/2012 at 03:05PM

Y1p4714jfgqbxwbk3xwedazq_2xf63nvvd0ebkioosczy777c2b3wruhnx0ipmlbxcuuhba2em5yik01eowh6yexq_normal
69
#35 - ise0615 / @ise0615

06/14/2012 at 10:28PM

Q620856699_8513_normal
74
#36 - Mikael Engström / @mikaelengstrom

06/05/2012 at 07:07AM

Profile_normal
76
#37 - Jason Felice / @eraserhd

06/19/2012 at 04:05PM

Avatar_normal
81
#38 - Jan Wedekind / @wedesoft

07/13/2012 at 11:59AM

Gir_normal
81
#39 - tea_sea / @tea_sea

10/09/2012 at 04:56PM

Angela-winter_-_profile_normal
84
#40 - Angela Harms / @angelaharms

06/19/2012 at 04:08PM