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):
12
#61 - Marcin Szamotulski / @me_coot

09/25/2012 at 09:55PM

12
#62 - cj / @cj01101

08/26/2013 at 10:46PM

12
#63 - Joonas Pihlajamaa / @jokkebk

02/23/2014 at 04:51PM

12
#64 - churaki / @churaki

01/29/2019 at 01:58AM

12
#65 - Mihai / @mihaicristiant

04/01/2019 at 09:58AM

12
#66 - blabla zincou / @BZincou

04/13/2022 at 10:55PM

12
#67 - Levi Wheeler / @LeviWhe68726437

06/16/2022 at 07:53PM

12
#68 - Willy / @Willy6932612311

09/13/2024 at 08:31PM

13
#69 - Jason Bruce / @jbrucenet

11/24/2011 at 04:31AM

13
#70 - Gabriel Barta / @gbarta

12/02/2011 at 12:22PM

13
#71 - Al / @96258

12/12/2011 at 11:31PM

13
#72 - pmuston / @pmuston

03/28/2012 at 05:57AM

13
#73 - Kerson Hsiao / @KersonHsiao

05/06/2012 at 07:34AM

14
#74 - Daniel Hjerth / @danielhjerth

11/09/2011 at 05:38PM

14
#75 - D A / @7187dd578b325d2

11/24/2011 at 12:13PM

14
#76 - John Anderson / @opejn

12/26/2011 at 06:25AM

14
#77 - Dave / @zzdave13

02/01/2012 at 11:20PM

14
#78 - Jiří Chára / @JiriChara

02/03/2012 at 12:09PM

14
#79 - perTheGolfer / @GolferPer

10/09/2020 at 07:57PM

15
#80 - Rik Lomas / @riklomas

12/18/2011 at 10:56PM

15
#81 - Burkhard Zimmermann / @BurkZimm

12/30/2011 at 08:55PM

15
#82 - t-mce / @t_mce

02/12/2012 at 12:46PM

15
#83 - Anouar ADLANI / @aadlani

07/12/2012 at 11:14PM

15
#84 - Reed Riley / @ReedRile

08/12/2012 at 10:28PM

15
#85 - brett / @brettyukich

09/23/2013 at 05:09AM

16
#86 - Jer Wilson / @superjercom

10/28/2011 at 07:52AM

16
#87 - Mattiassich Ákos / @mattiassicha

11/23/2011 at 06:48PM

16
#88 - steve / @steve35773420

03/04/2023 at 02:51PM

17
#89 - twobit / @_2bt

01/04/2012 at 01:07AM

17
#90 - veki / @vx_ras

02/02/2012 at 08:10PM