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 68 remaining solutions by signing in and submitting your own entry
#69 mojito04 / @mojito04 - Score: 68 - 04/24/25 @ 21:02
<C-C><C-C>llll<Esc>h0<Esc><C-V>lllllxA<Esc>pi,<Esc>A<Esc>x<Esc>jhxx<Esc>0ie,<Esc><Esc>jjhxxA,a<Esc><Esc>j04d4xxxxxA<Tab><BS>,a,b<Esc>ZZ

0 comments


Created by: @psasqw

69 active golfers, 233 entries

Leaderboard (lowest score wins):
30
#61 - noom narze / @NarzE

06/29/2012 at 10:54AM

30
#62 - Alvin Francis / @alvinfrancis

07/20/2012 at 01:51PM

30
#63 - Ming / @x51ming

04/25/2025 at 01:10PM

32
#64 - shahanavaz m / @shahanavazm

03/22/2024 at 01:09AM

33
#65 - Arvin Moezzi / @kraphti

01/13/2014 at 12:05AM

35
#66 - Eumir Gaspar / @corrodedlotus

08/23/2012 at 08:43AM

47
#67 - Philippe Mongeau / @phmongeau

04/28/2013 at 10:23PM

51
#68 - Mahefa Randimbisoa / @DotMG

07/04/2012 at 10:53AM

68
#69 - mojito04 / @mojito04

04/24/2025 at 09:02PM