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 5052dd5c2a8bfe000200001c

Enharmonic Equivalents

Transform # and b to digraphs

Start file
Enharmonic Equivalents
C
# = Db
D
# = Eb
F
# = Gb
G
# = Ab
A
# = Bb
End file
Enharmonic Equivalents
C
= D
D
= E
F
= G
G
= A
A
= B

View Diff

diff --git a/input.txt b/output.txt
index 6e3429b..52b2969 100644
--- a/input.txt
+++ b/output.txt
@@ -1,6 +1,6 @@
Enharmonic Equivalents
C#C♯ = Db
D#D♭
D♯ = Eb
F#E♭
F♯ = Gb
G#G♭
G♯ = Ab
A#A♭
A♯ = BbB♭

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 36 remaining solutions by signing in and submitting your own entry
#37 shahanavaz m / @shahanavazm - Score: 47 - 04/01/24 @ 20:52
:%s/\C[#b]/\=tr(submatch(0),"#b","<C-K>MX<C-K>Mb")/g<CR>ZZ

0 comments


Created by: @DiffJunk

37 active golfers, 59 entries

Leaderboard (lowest score wins):
18
#1 - Kerson Hsiao / @KersonHsiao

09/16/2012 at 03:45PM

18
#2 - Conner McDaniel / @connermcd

09/17/2012 at 03:00PM

18
#3 - Urtica dioica / @udioica

11/13/2012 at 10:48AM

18
#4 - David Barnett / @mu_mind

11/26/2012 at 08:46AM

18
#5 - James / @Dronak

08/30/2013 at 12:28AM

18
#6 - Marian Vevurka / @MVevurka

10/17/2013 at 08:18PM

18
#7 - mnx / @mnxx

12/10/2013 at 10:53PM

18
#8 - John Braxler / @braxler

10/24/2014 at 03:43PM

18
#9 - Matt / @mcr05

01/10/2015 at 07:31PM

18
#10 - Jon Krause / @jkrause314

01/15/2016 at 05:20AM

18
#11 - Jan Bundesmann / @janbundesmann

04/05/2016 at 11:02AM

18
#12 - Ben Hill / @KaizenSoze70

05/24/2016 at 04:01PM

18
#13 - 何晨 / @hechen0_

09/22/2016 at 05:16PM

18
#14 - oscar / @zonza_mas

04/26/2017 at 04:43PM

18
#15 - Peppa Pig / @PeppaPigSg

06/29/2024 at 10:10AM

19
#16 - h_east (トロッコ6個) / @h_east

09/14/2012 at 08:34AM

19
#17 - Pete Johns / @johnsyweb

09/15/2012 at 03:56AM

19
#18 - Justin Love / @wondible

09/16/2012 at 03:38AM

19
#19 - じょんあば / @john_ababa

09/16/2012 at 11:57AM

19
#20 - Marcin Szamotulski / @me_coot

09/18/2012 at 03:19PM

19
#21 - Underhill Labs / @underhilllabs

11/05/2012 at 02:50AM

19
#22 - joe di castro / @joe_di_castro

08/04/2013 at 09:25AM

19
#23 - hiding / @I_haveno_name

10/06/2013 at 01:46PM

19
#24 - Kevin James / @KevinKarruthers

11/20/2013 at 08:51PM

19
#25 - Andreas Hagesjö / @Ankhagge

05/08/2014 at 12:28AM

19
#26 - r. / @rmarvie

12/25/2014 at 09:37AM

19
#27 - Joaquin Coronel / @cantstoptheguac

02/10/2017 at 06:26PM

19
#28 - Иван / @wansmer

05/04/2023 at 06:09PM

20
#29 - Jer Wilson / @superjercom

09/28/2012 at 07:56PM

20
#30 - Robert Siemieniec / @rsiemieniec

03/04/2014 at 12:45PM