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):
29
#271 - Nathan Manousos / @trafnar

04/02/2012 at 05:36AM

29
#272 - Rod Knowlton / @codelahoma

04/24/2012 at 01:13PM

29
#273 - Golf Sinteppadon / @minigolf2000

04/27/2012 at 10:33PM

29
#274 - Alan / @aluong91

07/17/2012 at 08:19AM

29
#275 - robin hafen / @rohafen

09/28/2012 at 02:18PM

29
#276 - Almog / @almog

03/11/2014 at 01:12PM

30
#277 - Tom von Clef / @tomvonclef

12/16/2011 at 07:27PM

30
#278 - Raphael Randschau / @nicolai86

12/25/2011 at 02:28PM

30
#279 - ところたん / @tokoro10g

04/14/2014 at 02:18AM

31
#280 - Matthew Cupps / @matthewcupps

12/20/2011 at 09:48PM

31
#281 - Jason Felice / @eraserhd

12/21/2011 at 01:00AM

31
#282 - Sergi Sorribas / @lerovitch

12/22/2011 at 12:19PM

31
#283 - Tara Bass / @tara_bass

12/23/2011 at 06:10AM

31
#284 - ümit kablan / @udslk

03/11/2012 at 07:53AM

31
#285 - Jomo / @yoyoyojomo

03/14/2012 at 05:47PM

32
#286 - arye lukashevski / @aryelukashevski

01/14/2012 at 05:59PM

32
#287 - Mike Rayner / @mikesfake

01/23/2012 at 06:57PM

33
#288 - Chris Penkett / @chrispenkett

04/03/2012 at 04:52PM

33
#289 - vansan / @VinceVansan

08/22/2012 at 10:26AM

34
#290 - krusty_ar / @krusty_ar

02/20/2012 at 05:01PM

34
#291 - Viktor Jackson / @AntiStalinista

05/05/2012 at 07:02AM

35
#292 - Mislav Marohnić / @mislav

12/05/2011 at 10:08PM

35
#293 - MrTchuss / @buffer_x90

08/08/2015 at 04:34PM

35
#294 - Vim Player / @PlayerVim

10/07/2019 at 02:06PM

40
#295 - Patrick Oscity / @der_padde

03/25/2014 at 05:39PM

42
#296 - Gurukandhamoorthi / @Gurukandhamoor1

07/13/2017 at 10:01AM

45
#297 - captain_morgan / @captain_morgan

11/28/2011 at 09:26PM

45
#298 - Dan Masquelier / @danmasq

12/08/2011 at 07:53PM

46
#299 - Noel Alejandro / @noelrock333

06/25/2012 at 08:46PM

48
#300 - alekfed / @alek_fed

04/15/2019 at 08:34PM