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 103 remaining solutions by signing in and submitting your own entry
#104 ajh / @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

104 active golfers, 315 entries

Leaderboard (lowest score wins):
11
#31 - Urtica dioica / @udioica

05/20/2012 at 04:29AM

11
#32 - Benoit Mortgat / @Benoit_Mortgat

06/06/2012 at 12:29PM

11
#33 - Conner McDaniel / @connermcd

09/18/2012 at 05:43AM

11
#34 - Alan Kessler / @alankesslr

11/03/2012 at 12:03AM

11
#35 - Trevor Powell / @DoomedBunnies

04/16/2013 at 06:25AM

11
#36 - Marco Hinz / @_mhinz_

05/24/2013 at 02:23PM

11
#37 - Petro Тrouq / @zulolosi

07/06/2013 at 01:18AM

11
#38 - John Braxler / @braxler

05/14/2014 at 07:42PM

11
#39 - Jon Krause / @jkrause314

01/15/2016 at 04:47AM

11
#40 - Turkey Man / @lvturkeyman

12/02/2017 at 03:45AM

11
#41 - DHM / @DHM29978992

05/28/2018 at 01:27AM

12
#42 - Neal Lindsay / @neall

11/10/2011 at 11:21PM

12
#43 - Matt Woelk / @MattWoelk

11/13/2011 at 04:43AM

12
#44 - Mislav Marohnić / @mislav

12/06/2011 at 04:18PM

12
#45 - no / @jt_vg

12/14/2011 at 03:36PM

12
#46 - Pei-Lun Lee / @ypcatw

12/19/2011 at 07:29AM

12
#47 - Justin Love / @wondible

12/24/2011 at 04:15PM

12
#48 - Vasil Sakarov / @vsakarov

12/28/2011 at 09:14AM

12
#49 -  Ikhsan Maulana / @ixandidu

01/07/2012 at 05:36AM

12
#50 - Arton0306 / @Arton0306

01/15/2012 at 09:56AM

12
#51 - kcliu / @kcliutw

01/30/2012 at 07:44AM

12
#52 - oliver mueller / @marcontwit

02/25/2012 at 03:59PM

12
#53 - not so punk :] / @notsopunk

03/31/2012 at 07:01AM

12
#54 - Chris Penkett / @chrispenkett

04/03/2012 at 05:57PM

12
#55 - Yusuke Tsutsumi / @tsutsumiyusuke

05/03/2012 at 09:28PM

12
#56 - Marcin Szamotulski / @me_coot

09/25/2012 at 09:55PM

12
#57 - cj / @cj01101

08/26/2013 at 10:46PM

12
#58 - Joonas Pihlajamaa / @jokkebk

02/23/2014 at 04:51PM

12
#59 - churaki / @churaki

01/29/2019 at 01:58AM

12
#60 - Mihai / @mihaicristiant

04/01/2019 at 09:58AM