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

remove dupes from array

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

Start file
[11, 2, 3,5  , 1,1, 22, 4]
End file
[1, 2, 3, 4, 5, 11, 22]

View Diff

1c1
< [11, 2, 3,5  , 1,1, 22, 4]
---
> [1, 2, 3, 4, 5, 11, 22]

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 309 remaining solutions by signing in and submitting your own entry
#310 Jasmin Rahimic / @jasmin_rahimic - Score: 170 - 12/07/11 @ 00:47
<Down><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Esc><Esc><Esc>lx6<Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><Esc>lx6wi 4<Esc>llc5w,ll<BS><BS><Esc>llc5w<Esc>uuuuuuuuu<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS>lx6wi 4, <Esc>llc5w, 11<Esc>2Edt]ZZ

0 comments


Created by: @mixandgo

310 active golfers, 1205 entries

Leaderboard (lowest score wins):
51
#301 - Markus / @markus1189

04/19/2012 at 03:36PM

53
#302 - Robert / @NiedruRoberts

12/15/2011 at 09:29AM

59
#303 - luffy / @raxcoi

06/07/2015 at 11:42AM

63
#304 - Petrik de Heus / @four54

01/14/2012 at 10:06PM

66
#305 - Joe Van Dyk / @joevandyk

01/14/2012 at 07:42PM

66
#306 - Timothy Hahn / @timyhahn

04/23/2012 at 05:33PM

67
#307 - Jurica / @Jurica34581259

11/16/2018 at 05:05PM

84
#308 - Poojalakshmi / @spoojalakshmi

03/23/2012 at 02:49PM

114
#309 - ZOMG / @monkeybot42

09/29/2012 at 10:44PM

170
#310 - Jasmin Rahimic / @jasmin_rahimic

12/07/2011 at 12:47AM