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 317 remaining solutions by signing in and submitting your own entry
#318 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

318 active golfers, 1253 entries

Leaderboard (lowest score wins):
26
#241 - Endir / @Endir2

04/17/2014 at 05:29PM

26
#242 - Ram Tamtam / @ramtamtamtam

07/10/2014 at 04:04PM

26
#243 - Kyouma / @kyoumaJohn

10/14/2016 at 07:31PM

26
#244 - Akash Khan / @akash93

04/20/2017 at 11:28AM

27
#245 - Asmund / @herrasbe

11/28/2011 at 09:01PM

27
#246 - Raphaël De Giusti / @raphdg

11/30/2011 at 03:53PM

27
#247 - bluse1995 / @bluse1995

01/21/2012 at 09:25PM

27
#248 - Aaron Cruz / @mraaroncruz

02/05/2012 at 02:28PM

27
#249 - Cody Veal / @cjhveal

02/05/2012 at 07:20PM

27
#250 - Mike Korcynski / @mkorcy

02/08/2012 at 09:09PM

27
#251 - Dan Herbert / @pocketninja_au

03/01/2012 at 08:54AM

27
#252 - Piotr Ślatała / @pslapsla

03/14/2012 at 10:58PM

27
#253 - Dave@Highgroove / @HighgrooveDave

05/22/2012 at 09:02PM

27
#254 - wes / @_weslly

07/15/2012 at 10:12PM

27
#255 - Paul Roberts / @psxpau1

07/31/2012 at 05:03PM

27
#256 - Pedro Franceschi / @pedroh96

02/06/2013 at 02:42AM

27
#257 - curist / @curist

07/09/2013 at 09:04AM

27
#258 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 04:41AM

27
#259 - Aaron Bieber / @aaronbieber

07/16/2013 at 11:33PM

27
#260 - Przemysław Kamiński / @CXLII

08/13/2013 at 03:12PM

27
#261 - Solar Powered Robot / @moskrin

05/01/2014 at 03:52PM

27
#262 - Tom Gilligan / @sargegood

07/07/2014 at 11:07PM

27
#263 - Tj / @yrddy

08/19/2014 at 02:52AM

27
#264 - Jake Worth / @jwworth

10/11/2014 at 06:01PM

27
#265 - SilentFl / @Silent_Fl

01/27/2015 at 02:16PM

27
#266 - Daniel / @Daniel00288663

03/30/2017 at 01:32PM

27
#267 - Clyde Fare / @ClydeFare

04/14/2017 at 12:08PM

27
#268 - Aaron / @_Lordofthevoid_

12/07/2019 at 09:02PM

28
#269 - Gregory Igelmund / @grekko

12/06/2011 at 09:55PM

28
#270 - Toto l'haricot / @nico_le_terribl

12/13/2011 at 10:22PM