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 4fe9ab8b5089660001000002

Shuffle and Sort

The values where sorted incorrectly. Get them back to how they are supposed to be

Start file
a,b,c,d,e
a
,b,c,d,e
a
,b,c,d,e
a
,b,c,d,e
a
,b,c,d,e
End file
d,e,a,b,c
e
,a,b,c,d
a
,b,c,d,e
b
,c,d,e,a
c
,d,e,a,b

View Diff

0a1,2
> d,e,a,b,c
> e,a,b,c,d
2,5c4,5
< a,b,c,d,e
< a,b,c,d,e
< a,b,c,d,e
< a,b,c,d,e
---
> b,c,d,e,a
> c,d,e,a,b

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 66 remaining solutions by signing in and submitting your own entry
#67 Mahefa Randimbisoa / @DotMG - Score: 51 - 07/04/12 @ 10:53
:%s:<BS>!,!!g<CR>2x$pk0x$pkkx0Pk3xlp:%s!.!\0,!g<CR>:%s!,$<CR>ZZ

0 comments


Created by: @psasqw

67 active golfers, 229 entries

Leaderboard (lowest score wins):
17
#1 - Urtica dioica / @udioica

06/27/2012 at 05:07PM

17
#2 - Federico Galassi / @federicogalassi

06/27/2012 at 06:18PM

17
#3 - Conner McDaniel / @connermcd

06/28/2012 at 05:27AM

17
#4 - Tim Chase / @gumnos

06/30/2012 at 03:54PM

17
#5 - Peter Anselmo / @peter_anselmo

07/28/2012 at 03:55PM

17
#6 - Victor Ramirez / @virako

10/20/2012 at 12:52AM

17
#7 - Marco Hinz / @_mhinz_

05/26/2013 at 11:44PM

17
#8 - John Braxler / @braxler

06/04/2014 at 01:49PM

17
#9 - Mister Knister / @vimgolf_ctrl_x

03/16/2016 at 02:01PM

17
#10 - Turkey Man / @lvturkeyman

10/22/2018 at 09:49AM

17
#11 - blabla zincou / @BZincou

03/29/2022 at 07:28PM

17
#12 - Qing Liu / @poeminlash

08/14/2022 at 03:05AM

17
#13 - Jean George / @JeanGeo20504212

03/15/2024 at 11:28PM

17
#14 - Peppa Pig / @PeppaPigSg

07/03/2024 at 06:59AM

17
#15 - nickGPT / @nickandbro

08/28/2024 at 08:08PM

18
#16 - Kerson Hsiao / @KersonHsiao

06/28/2012 at 05:55AM

18
#17 - Raúl Jara / @rauljara

07/07/2012 at 02:44PM

19
#18 - mwatkward / @AftrschoolSpe

06/27/2012 at 12:45PM

19
#19 - Dave / @zzdave13

07/02/2012 at 09:32PM

19
#20 - Daniel S / @smatter0ne

07/15/2012 at 11:01PM

19
#21 - Chris Brown / @engineercyb

07/27/2012 at 09:30PM

19
#22 - James Davis / @tripvg

08/05/2012 at 06:34AM

19
#23 - drdanz / @drdanz

02/17/2015 at 03:41PM

19
#24 - Jon Krause / @jkrause314

01/15/2016 at 05:16AM

20
#25 - Justin Love / @wondible

06/27/2012 at 06:29AM

21
#26 - Adam Pohorecki / @apohorecki

06/27/2012 at 04:44PM

22
#27 - oliver mueller / @marcontwit

07/07/2012 at 08:01PM

22
#28 - tmr / @tmr314

09/06/2012 at 02:51PM

22
#29 - Joonas Pihlajamaa / @jokkebk

03/15/2014 at 10:06AM

22
#30 - Janzen / @__Coos

09/25/2022 at 02:42PM