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

56 active golfers, 214 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

32
#9 - Daniël De Koker / @daniel_koker

07/18/2018 at 03:13PM

32
#10 - Martin Delille / @martinodelilo

09/02/2019 at 06:36PM

32
#11 - blabla zincou / @BZincou

04/04/2022 at 09:16PM

32
#12 - nickGPT / @nickandbro

08/28/2024 at 08:47PM

32
#13 - Peppa Pig / @PeppaPigSg

08/31/2024 at 07:30AM

33
#14 - Tim Chase / @gumnos

06/05/2012 at 10:38AM

33
#15 - Aaron Lake / @aaronmlake

06/05/2012 at 12:28PM

33
#16 - James Davis / @tripvg

08/04/2012 at 09:05PM

33
#17 - Gabriel Barta / @gbarta

06/18/2019 at 12:45PM

33
#18 - roudens / @roudens2

02/14/2021 at 04:20AM

34
#19 - Justin Love / @wondible

06/05/2012 at 02:09PM

36
#20 - Benson Kim / @BensonRLA

06/06/2012 at 09:45AM

36
#21 - Édouard M'tou / @DouardM

10/09/2012 at 04:27PM

37
#22 - Javier Blanco / @jbgutierrez

06/06/2012 at 10:40PM

37
#23 - Kerson Hsiao / @KersonHsiao

08/04/2012 at 04:05PM

37
#24 - Sean Griffin / @sgrif

08/13/2012 at 01:57AM

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

06/06/2012 at 09:07AM

40
#26 - cj / @cj01101

02/05/2014 at 09:27PM

40
#27 - Janzen / @__Coos

09/26/2022 at 08:07AM

41
#28 - wemgulf / @wemgulfer

11/02/2023 at 07:29PM

42
#29 - Benoit Mortgat / @Benoit_Mortgat

06/05/2012 at 05:17AM

42
#30 - Marcin Owerczuk / @marcinowerczuk

06/13/2012 at 07:46AM