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):
27
#241 - Aaron Cruz / @mraaroncruz

02/05/2012 at 02:28PM

27
#242 - Cody Veal / @cjhveal

02/05/2012 at 07:20PM

27
#243 - Mike Korcynski / @mkorcy

02/08/2012 at 09:09PM

27
#244 - Dan Herbert / @pocketninja_au

03/01/2012 at 08:54AM

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

03/14/2012 at 10:58PM

27
#246 - Dave@Highgroove / @HighgrooveDave

05/22/2012 at 09:02PM

27
#247 - wes / @_weslly

07/15/2012 at 10:12PM

27
#248 - Paul Roberts / @psxpau1

07/31/2012 at 05:03PM

27
#249 - Pedro Franceschi / @pedroh96

02/06/2013 at 02:42AM

27
#250 - curist / @curist

07/09/2013 at 09:04AM

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

07/15/2013 at 04:41AM

27
#252 - Aaron Bieber / @aaronbieber

07/16/2013 at 11:33PM

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

08/13/2013 at 03:12PM

27
#254 - Solar Powered Robot / @moskrin

05/01/2014 at 03:52PM

27
#255 - Tom Gilligan / @sargegood

07/07/2014 at 11:07PM

27
#256 - Tj / @yrddy

08/19/2014 at 02:52AM

27
#257 - Jake Worth / @jwworth

10/11/2014 at 06:01PM

27
#258 - SilentFl / @Silent_Fl

01/27/2015 at 02:16PM

27
#259 - Daniel / @Daniel00288663

03/30/2017 at 01:32PM

27
#260 - Clyde Fare / @ClydeFare

04/14/2017 at 12:08PM

28
#261 - Gregory Igelmund / @grekko

12/06/2011 at 09:55PM

28
#262 - Toto l'haricot / @nico_le_terribl

12/13/2011 at 10:22PM

28
#263 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:20AM

28
#264 - akira_simpson / @akira_simpson

02/02/2012 at 11:40AM

28
#265 - Jay Stotz / @jstotz

02/05/2012 at 07:21PM

28
#266 - Reed Riley / @ReedRile

08/12/2012 at 10:07PM

28
#267 - Chris LeBlanc / @cleblanc87

09/25/2013 at 10:38PM

28
#268 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:05AM

29
#269 - Kiss György / @Walkman_

01/08/2012 at 04:51AM

29
#270 - James Chiang / @jamesjn5

04/01/2012 at 03:53AM