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

Sort entries based on date

Sort some entries in a Ledger-file based on date.

Start file
10.09.2011 Description
  Some
  Stuff

15.09.2011 * Anything really
  Random
  Stuff

12.10.2011 Nice
  Not
  Kidding

12.09.2011 Whatever
  Anything
  Can
  Be
  Here

14.09.2011 Cool
  But
  It's always
  Indented

13.09.2011 Testing
  Always
  2 spaces

End file
10.09.2011 Description
  Some
  Stuff

12.09.2011 Whatever
  Anything
  Can
  Be
  Here

13.09.2011 Testing
  Always
  2 spaces

14.09.2011 Cool
  But
  It's always
  Indented

15.09.2011 * Anything really
  Random
  Stuff

12.10.2011 Nice
  Not
  Kidding

View Diff

5,12d4
< 15.09.2011 * Anything really
<   Random
<   Stuff
< 
< 12.10.2011 Nice
<   Not
<   Kidding
< 
18a11,14
> 13.09.2011 Testing
>   Always
>   2 spaces
> 
24,26c20,26
< 13.09.2011 Testing
<   Always
<   2 spaces
---
> 15.09.2011 * Anything really
>   Random
>   Stuff
> 
> 12.10.2011 Nice
>   Not
>   Kidding

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 99 remaining solutions by signing in and submitting your own entry
#100 Alex Hammel / @AlexJHammel - Score: 80 - 12/24/12 @ 19:58
:%s/\v(\d+)\.(\d+)\.(\d+)/\3.2<BS>\2.\1<CR>:%s/\(..*\)\n/\1;/<CR>:sor<CR>:%s/;/\r/g<CR>:<Up><Up><Up><Up><CR>ZZ

0 comments


Created by: @judofyr

100 active golfers, 292 entries

Leaderboard (lowest score wins):
11
#1 - h_east (トロッコ6個) / @h_east

10/27/2011 at 10:20PM

11
#2 - Tim Chase / @gumnos

10/28/2011 at 12:11AM

11
#3 - Pavlo Klets / @p01nt

10/28/2011 at 09:09AM

11
#4 - Raphaël De Giusti / @raphdg

10/28/2011 at 10:48AM

11
#5 - vimja / @vimja666

10/29/2011 at 05:16AM

11
#6 - omelo / @omelo

11/10/2011 at 04:51PM

11
#7 - Travis Jeffery / @travisjeffery

11/11/2011 at 05:28PM

11
#8 - William Dunand / @wdunand

11/14/2011 at 02:35AM

11
#9 - Nick Klauer / @klauern

11/20/2011 at 04:21AM

11
#10 - Dragan Cvetinovic / @kawkafi

11/20/2011 at 01:51PM

11
#11 - Paul Kalupnieks / @kalupa

11/24/2011 at 05:56PM

11
#12 - You-Siang Lin / @yslinnctu

11/28/2011 at 03:16AM

11
#13 - Utkarsh Kukreti / @utkarshkukreti

12/03/2011 at 03:55PM

11
#14 - Balkoth / @_Balkoth_

12/03/2011 at 09:16PM

11
#15 - 0x5042 / @0x5042

12/08/2011 at 09:38PM

11
#16 - A / @tndrnt

12/11/2011 at 12:40PM

11
#17 - Alain Gilbert / @alain_gilbert

12/15/2011 at 10:30PM

11
#18 - Mihai Crăiță / @mihai_craita

12/17/2011 at 02:51PM

11
#19 - Abdel Said / @abdelsaid

02/10/2012 at 11:43PM

11
#20 - Dave Harrington / @ozzy_dave

02/11/2012 at 08:14PM

11
#21 - Alexander Scherbinin / @realmyst

02/14/2012 at 12:18AM

11
#22 - Dan Huang / @yuzeh

02/16/2012 at 07:42PM

11
#23 - Federico Galassi / @federicogalassi

02/22/2012 at 03:05AM

11
#24 - Renat Aksitov / @Korvin79

02/23/2012 at 07:20PM

11
#25 - Peter Anselmo / @peter_anselmo

03/08/2012 at 12:49AM

11
#26 - Bartłomiej Kozal / @bkzl_

03/26/2012 at 09:04PM

11
#27 - learninghang / @learninghang

04/14/2012 at 07:14AM

11
#28 - Sebastian Kusnier / @skusnier

04/30/2012 at 12:08PM

11
#29 - ise0615 / @ise0615

05/05/2012 at 09:07AM

11
#30 - Son of Bongo / @bpcode

05/13/2012 at 11:32AM