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 56e36925d64dfc4d28000001

Inner hyphens

Yet another hyphen challenge. Adding 5 hyphens to a file shouldn't be too hard.

Start file
abcdef
End file
a-b-c-d-e-f

View Diff

Why are you checking the diff? There's never anything good here.

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 75 remaining solutions by signing in and submitting your own entry
#76 Jonathan / @jmcphers - Score: 14 - 08/16/16 @ 19:56
:s/./&-/g<CR>$xZZ

0 comments


Created by: @udioica

76 active golfers, 122 entries

Leaderboard (lowest score wins):
12
#61 - Bill Ruddock / @biinari

10/25/2016 at 02:12PM

12
#62 - Michał Dytko / @DytkoM

12/28/2016 at 01:59PM

12
#63 - Gurukandhamoorthi / @Gurukandhamoor1

08/01/2017 at 03:18PM

12
#64 - Saul Hardman / @saulhardman

08/14/2017 at 07:58AM

12
#65 - Mihai / @mihaicristiant

04/10/2019 at 08:56AM

12
#66 - Josefina Alconada / @jochiAlconada

10/06/2019 at 10:25AM

12
#67 - int@紅ぽよ / @int_cl

08/12/2020 at 10:02PM

12
#68 - roudens / @roudens2

02/07/2021 at 10:00AM

12
#69 - br_bookbinder / @br_bookbinder

04/29/2021 at 08:37PM

12
#70 - Jean George / @JeanGeo20504212

06/08/2022 at 10:18AM

13
#71 - Matt / @mcr05

03/12/2016 at 11:08AM

13
#72 - Janko Jerinic / @JankoJerinic

03/26/2016 at 08:20AM

13
#73 - aisapatino / @aisapatino

03/29/2016 at 11:29PM

13
#74 - Feras / @faldah

05/01/2016 at 02:16PM

13
#75 - vic © / @2r2w

05/20/2016 at 03:21PM

14
#76 - Jonathan / @jmcphers

08/16/2016 at 07:56PM