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):
35
#301 - MrTchuss / @buffer_x90

08/08/2015 at 04:34PM

35
#302 - Vim Player / @PlayerVim

10/07/2019 at 02:06PM

40
#303 - Patrick Oscity / @der_padde

03/25/2014 at 05:39PM

42
#304 - Gurukandhamoorthi / @Gurukandhamoor1

07/13/2017 at 10:01AM

45
#305 - captain_morgan / @captain_morgan

11/28/2011 at 09:26PM

45
#306 - Dan Masquelier / @danmasq

12/08/2011 at 07:53PM

46
#307 - Noel Alejandro / @noelrock333

06/25/2012 at 08:46PM

48
#308 - alekfed / @alek_fed

04/15/2019 at 08:34PM

51
#309 - Markus / @markus1189

04/19/2012 at 03:36PM

53
#310 - Robert / @NiedruRoberts

12/15/2011 at 09:29AM

59
#311 - luffy / @raxcoi

06/07/2015 at 11:42AM

63
#312 - Petrik de Heus / @four54

01/14/2012 at 10:06PM

66
#313 - Joe Van Dyk / @joevandyk

01/14/2012 at 07:42PM

66
#314 - Timothy Hahn / @timyhahn

04/23/2012 at 05:33PM

67
#315 - Jurica / @Jurica34581259

11/16/2018 at 05:05PM

84
#316 - Poojalakshmi / @spoojalakshmi

03/23/2012 at 02:49PM

114
#317 - ZOMG / @monkeybot42

09/29/2012 at 10:44PM

170
#318 - Jasmin Rahimic / @jasmin_rahimic

12/07/2011 at 12:47AM