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):
17
#91 - Ram Tamtam / @ramtamtamtam

07/02/2014 at 01:18PM

17
#92 - Daniel / @Daniel00288663

04/06/2017 at 02:12PM

17
#93 - POSIX / @po6ix

02/02/2022 at 05:44PM

18
#94 - Dave@Highgroove / @HighgrooveDave

05/23/2012 at 02:46AM

18
#95 - Felipe Jaramillo F / @mrfelipe

06/02/2014 at 11:24PM

18
#96 - RockerZZY / @rocker_zzy

07/10/2020 at 12:44AM

18
#97 - 우정민 / @jeongmin2021

10/08/2022 at 07:09PM

18
#98 - shahanavaz m / @shahanavazm

03/16/2024 at 05:47AM

19
#99 - Sergi Sorribas / @lerovitch

12/22/2011 at 12:43PM

20
#100 - Andy Pincombe / @ampersandy

10/29/2011 at 07:23PM

20
#101 - Øystein Walle / @oysteinwalle

11/09/2011 at 07:32PM

20
#102 - RusAlex Pletnev / @RusAlexander

11/14/2011 at 05:29PM

20
#103 - DamienVGN / @DamienVGN

11/15/2011 at 09:52PM

20
#104 - Diego Calderon / @SoIcanSwim

11/21/2011 at 11:51PM

20
#105 - Jakub Arnold / @darthdeus

12/13/2011 at 09:28AM

22
#106 - Miłosz Łakomy / @foobar01123

09/23/2021 at 09:37AM

23
#107 - Thijs Brobbel / @tiesmaster

12/03/2011 at 01:22PM

26
#108 - Gowtham Madhava / @gowthamgowtham

11/17/2011 at 01:57PM

26
#109 - James / @Dronak

09/21/2014 at 03:01AM

27
#110 - Frank Perez / @frankperez87

12/22/2011 at 01:36AM

28
#111 - じょんあば / @john_ababa

02/29/2012 at 07:47AM

30
#112 - @AndrewRadev@hachyderm.io / @andrewradev

10/28/2011 at 07:32AM

33
#113 - Gurukandhamoorthi / @Gurukandhamoor1

08/18/2017 at 03:07PM

42
#114 - Oliver Christ / @0liverChrist

10/14/2013 at 02:32PM

46
#115 - Kyle Decot / @kyledecot

01/13/2012 at 09:37PM

71
#116 - Dühöngő / @aswna

11/24/2011 at 05:51PM

80
#117 - ajh / @AlexJHammel

12/24/2012 at 07:58PM