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

117 active golfers, 392 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

11
#42 - Jean George / @JeanGeo20504212

05/31/2022 at 11:30AM

11
#43 - russellzhaomao / @russellzhaomao

05/31/2022 at 01:06PM

11
#44 - Janzen / @__Coos

09/22/2022 at 09:53AM

11
#45 - Peppa Pig / @PeppaPigSg

07/03/2024 at 07:27AM

11
#46 - nickGPT / @nickandbro

08/28/2024 at 10:26PM

12
#47 - Neal Lindsay / @neall

11/10/2011 at 11:21PM

12
#48 - Matt Woelk / @MattWoelk

11/13/2011 at 04:43AM

12
#49 - Mislav Marohnić / @mislav

12/06/2011 at 04:18PM

12
#50 - no / @jt_vg

12/14/2011 at 03:36PM

12
#51 - Pei-Lun Lee / @ypcatw

12/19/2011 at 07:29AM

12
#52 - Justin Love / @wondible

12/24/2011 at 04:15PM

12
#53 - Vasil Sakarov / @vsakarov

12/28/2011 at 09:14AM

12
#54 -  Ikhsan Maulana / @ixandidu

01/07/2012 at 05:36AM

12
#55 - Arton0306 / @Arton0306

01/15/2012 at 09:56AM

12
#56 - kcliu / @kcliutw

01/30/2012 at 07:44AM

12
#57 - oliver mueller / @marcontwit

02/25/2012 at 03:59PM

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

03/31/2012 at 07:01AM

12
#59 - Chris Penkett / @chrispenkett

04/03/2012 at 05:57PM

12
#60 - Yusuke Tsutsumi / @tsutsumiyusuke

05/03/2012 at 09:28PM