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

336 active golfers, 1358 entries

Leaderboard (lowest score wins):
30
#301 - Tom von Clef / @tomvonclef

12/16/2011 at 07:27PM

30
#302 - Raphael Randschau / @nicolai86

12/25/2011 at 02:28PM

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

04/14/2014 at 02:18AM

31
#304 - Matthew Cupps / @matthewcupps

12/20/2011 at 09:48PM

31
#305 - Jason Felice / @eraserhd

12/21/2011 at 01:00AM

31
#306 - Sergi Sorribas / @lerovitch

12/22/2011 at 12:19PM

31
#307 - Tara Bass / @tara_bass

12/23/2011 at 06:10AM

31
#308 - ümit kablan / @udslk

03/11/2012 at 07:53AM

31
#309 - Jomo / @yoyoyojomo

03/14/2012 at 05:47PM

32
#310 - arye lukashevski / @aryelukashevski

01/14/2012 at 05:59PM

32
#311 - Mike Rayner / @mikesfake

01/23/2012 at 06:57PM

33
#312 - Chris Penkett / @chrispenkett

04/03/2012 at 04:52PM

33
#313 - vansan / @VinceVansan

08/22/2012 at 10:26AM

34
#314 - krusty_ar / @krusty_ar

02/20/2012 at 05:01PM

34
#315 - Viktor Jackson / @AntiStalinista

05/05/2012 at 07:02AM

35
#316 - Mislav Marohnić / @mislav

12/05/2011 at 10:08PM

35
#317 - MrTchuss / @buffer_x90

08/08/2015 at 04:34PM

35
#318 - Vim Player / @PlayerVim

10/07/2019 at 02:06PM

40
#319 - Patrick Oscity / @der_padde

03/25/2014 at 05:39PM

41
#320 - nickGPT / @nickandbro

08/28/2024 at 10:24PM

42
#321 - Gurukandhamoorthi / @Gurukandhamoor1

07/13/2017 at 10:01AM

45
#322 - captain_morgan / @captain_morgan

11/28/2011 at 09:26PM

45
#323 - Dan Masquelier / @danmasq

12/08/2011 at 07:53PM

46
#324 - Noel Alejandro / @noelrock333

06/25/2012 at 08:46PM

48
#325 - alekfed / @alek_fed

04/15/2019 at 08:34PM

51
#326 - Markus / @markus1189

04/19/2012 at 03:36PM

53
#327 - Robert / @NiedruRoberts

12/15/2011 at 09:29AM

56
#328 - shahanavaz m / @shahanavazm

03/17/2024 at 01:10AM

59
#329 - luffy / @raxcoi

06/07/2015 at 11:42AM

63
#330 - Petrik de Heus / @four54

01/14/2012 at 10:06PM