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 47 remaining solutions by signing in and submitting your own entry
#48 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

48 active golfers, 158 entries

Leaderboard (lowest score wins):
49
#31 - Dil / @dilpun

06/08/2012 at 02:19PM

49
#32 - Underhill Labs / @underhilllabs

10/30/2012 at 05:05AM

50
#33 - shutl_test / @shutl_test

06/06/2012 at 09:00PM

50
#34 - vimgolf dp / @DpVimgolf

06/12/2012 at 10:09PM

50
#35 - Yann Moisan / @YannMoisan

01/26/2013 at 08:17AM

52
#36 - Ilya Ermolin / @ermolinis

06/21/2012 at 07:26AM

55
#37 - james_bunch / @james_bunch

05/26/2019 at 03:11AM

56
#38 - squdle / @squdle

06/17/2017 at 12:28PM

57
#39 - John Whitley / @johnwhitley

06/05/2012 at 04:02PM

64
#40 - Oliver Mader / @dotb52

07/17/2012 at 07:33AM

65
#41 - mnx / @mnxx

06/05/2012 at 10:05PM

66
#42 - Guillaume Seren / @guillaumeseren

11/21/2014 at 05:08PM

69
#43 - ise0615 / @ise0615

06/15/2012 at 05:28AM

74
#44 - Mikael Engström / @mikaelengstrom

06/05/2012 at 02:07PM

76
#45 - Jason Felice / @eraserhd

06/19/2012 at 11:05PM

81
#46 - Jan Wedekind / @wedesoft

07/13/2012 at 06:59PM

81
#47 - Tom Cammann / @tea_sea

10/09/2012 at 11:56PM

84
#48 - Angela Harms / @angelaharms

06/19/2012 at 11:08PM