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):
17
#31 - Christian Helbling / @friendly_coder

03/24/2012 at 12:29AM

17
#32 - Analog / @analogp1xel

03/26/2012 at 01:47AM

17
#33 - learninghang / @learninghang

04/14/2012 at 06:12AM

17
#34 - Sebastian Kusnier / @skusnier

04/15/2012 at 12:23PM

17
#35 - Urtica dioica / @udioica

05/19/2012 at 09:01AM

17
#36 - Benoit Mortgat / @Benoit_Mortgat

06/06/2012 at 12:43PM

17
#37 - Conner McDaniel / @connermcd

06/12/2012 at 12:25AM

17
#38 - Wei Dai / @clvv42

07/12/2012 at 08:59PM

17
#39 - Daniel S / @smatter0ne

07/17/2012 at 10:46AM

17
#40 - Frank Twitting / @knarfben

07/19/2012 at 01:49PM

17
#41 - Joseph J. Piché / @jjpiche

08/26/2012 at 01:40AM

17
#42 - Vim rocks / @vimrocks

10/09/2012 at 01:42PM

17
#43 - Tom Cammann / @tea_sea

11/14/2012 at 11:27AM

17
#44 - Trevor Powell / @DoomedBunnies

04/16/2013 at 03:12AM

17
#45 - Kate / @Arohanui

05/04/2013 at 01:45AM

17
#46 - Marco Hinz / @_mhinz_

05/22/2013 at 11:14AM

17
#47 - Petro Тrouq / @zulolosi

05/29/2013 at 09:24PM

17
#48 - Bradd Szonye / @bszonye

07/12/2013 at 06:56AM

17
#49 - Steve Tjoa / @stevetjoa

07/15/2013 at 02:50AM

17
#50 - Rikin Patel / @rikin_patel

08/31/2013 at 08:21PM

17
#51 - Stephen Drodge / @sjdrodge

10/08/2013 at 01:37AM

17
#52 - thasso / @thasso23

10/28/2013 at 10:25PM

17
#53 - Stefan Schmidt / @stafue

12/06/2013 at 10:45AM

17
#54 - Joshua Appelman / @JoshuaAppelman

12/21/2013 at 09:48PM

17
#55 - Jeremy Gold / @JeremyGold3

03/15/2014 at 10:07AM

17
#56 - John Braxler / @braxler

03/21/2014 at 10:38PM

17
#57 - ZorgroZ / @ZorgroZ

04/13/2014 at 08:51PM

17
#58 - Kelsey Ando / @d_chan42

07/09/2014 at 06:39PM

17
#59 - Michi Loro / @michiloro

07/30/2014 at 11:10AM

17
#60 - LC / @leeren

08/09/2014 at 09:10PM