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 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 35 remaining solutions by signing in and submitting your own entry
#36 Oliver Mader / dotb52 - Score: 64 - 07/17/12 @ 07:33
:%s/^| \||\|\s\+|$//g<CR>1Go-----  -----  ---------  -----------<Esc>ZZ

0 comments

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

0 comments

#38 Guillaume Seren / guillaumeseren - Score: 66 - 11/21/14 @ 17:08
:%s/^| \||\|\s\+|$//g<CR>1Go-----  -----  ---------  -----------<CR><BS><Esc>ZZ

0 comments

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

0 comments

#40 Mikael Engström / mikaelengstrom - Score: 74 - 06/05/12 @ 14: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

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

0 comments

#42 Jan Wedekind / wedesoft - Score: 81 - 07/13/12 @ 18: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

#43 Tom Cammann / tea_sea - Score: 81 - 10/09/12 @ 23: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

#44 Angela Harms / angelaharms - Score: 84 - 06/19/12 @ 23: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

44 active golfers, 132 entries

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

06/06/2012 at 10:16PM

32
#2 - Conner McDaniel / connermcd

06/06/2012 at 11:40PM

32
#3 - Sergey / sav86

06/12/2012 at 05:43AM

32
#4 - Rod Knowlton / codelahoma

06/12/2012 at 10:46AM

32
#5 - David / ebonhand09

06/12/2012 at 11:25AM

32
#6 - Daniel S / smatter0ne

07/16/2012 at 12:36AM

32
#7 - Emile Swarts / EmileSwarts

08/19/2012 at 05:19PM

32
#8 - John Braxler / braxler

07/02/2014 at 06:05PM

33
#9 - Tim Chase / gumnos

06/05/2012 at 10:38AM

33
#10 - Aaron Lake / aaronmlake

06/05/2012 at 12:28PM

33
#11 - James Davis / tripvg

08/04/2012 at 09:05PM

34
#12 - Justin Love / wondible

06/05/2012 at 02:09PM

36
#13 - Benson Kim / BensonRLA

06/06/2012 at 09:45AM

36
#14 - Édouard M'tou / DouardM

10/09/2012 at 04:27PM

37
#15 - Javier Blanco / jbgutierrez

06/06/2012 at 10:40PM

37
#16 - Kerson Hsiao / KersonHsiao

08/04/2012 at 04:05PM

37
#17 - Sean Griffin / sgrif

08/13/2012 at 01:57AM

40
#18 - h_east (トロッコ6個) / h_east

06/06/2012 at 09:07AM

40
#19 - cj / cj01101

02/05/2014 at 09:27PM

42
#20 - Benoit Mortgat / Benoit_Mortgat

06/05/2012 at 05:17AM

42
#21 - Marcin Owerczuk / marcinowerczuk

06/13/2012 at 07:46AM

43
#22 - Raúl Jara / rauljara

07/10/2012 at 12:47AM

44
#23 - William Dunand / wdunand

07/27/2012 at 07:56AM

46
#24 - Pandae / psasqw

06/21/2012 at 01:43PM

47
#25 - 無ん垢の叫び / john_ababa

06/08/2012 at 03:14PM

47
#26 - Steven Occhipinti / steveocchipinti

06/12/2012 at 03:10AM

47
#27 - J Paul Daigle / philosodad

06/16/2012 at 11:53AM

49
#28 - Dil / dilpun

06/08/2012 at 02:19PM

49
#29 - Underhill Labs / underhilllabs

10/30/2012 at 05:05AM

50
#30 - shutl_test / shutl_test

06/06/2012 at 09:00PM

50
#31 - vimgolf dp / DpVimgolf

06/12/2012 at 10:09PM

50
#32 - Yann Moisan / YannMoisan

01/26/2013 at 08:17AM

52
#33 - Ilya Ermolin / ermolinis

06/21/2012 at 07:26AM

56
#34 - squdle / squdle

06/17/2017 at 12:28PM

57
#35 - John Whitley / johnwhitley

06/05/2012 at 04:02PM

64
#36 - Oliver Mader / dotb52

07/17/2012 at 07:33AM

65
#37 - mnx / mnxx

06/05/2012 at 10:05PM

66
#38 - Guillaume Seren / guillaumeseren

11/21/2014 at 05:08PM

69
#39 - ise0615 / ise0615

06/15/2012 at 05:28AM

74
#40 - Mikael Engström / mikaelengstrom

06/05/2012 at 02:07PM

76
#41 - Jason Felice / eraserhd

06/19/2012 at 11:05PM

81
#42 - Jan Wedekind / wedesoft

07/13/2012 at 06:59PM

81
#43 - Tom Cammann / tea_sea

10/09/2012 at 11:56PM

84
#44 - Angela Harms / angelaharms

06/19/2012 at 11:08PM