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):
25
#241 - Pavel Nikitin / @pavel_nikitin

03/31/2012 at 08:10PM

25
#242 - David L Goldberg / @DavidLGoldberg1

09/20/2013 at 04:09AM

25
#243 - A. N. / @arez42

10/24/2013 at 06:51AM

25
#244 - eBrnd / @eBrnd

11/03/2014 at 06:00PM

25
#245 - Clark DuVall / @theclarkatron

05/19/2015 at 04:44AM

25
#246 - Gerald Tilma / @GeraldTilma

10/20/2015 at 01:48AM

25
#247 - Vaisian / @Vaisian

07/02/2016 at 09:05PM

25
#248 - Will / @obiwan__k3n00bi

07/31/2016 at 10:04PM

25
#249 - OlivierLi / @LiZhongSin

11/17/2016 at 02:27PM

25
#250 - RockerZZY / @rocker_zzy

06/11/2020 at 11:27PM

26
#251 - Dmitry Teslenko / @krab_mozga

11/29/2011 at 06:55AM

26
#252 - Petro Verkhogliad / @vpetro

12/05/2011 at 08:52AM

26
#253 - Frank Perez / @frankperez87

12/21/2011 at 02:01PM

26
#254 - Hawk Newton / @hawknewton

04/24/2012 at 12:14PM

26
#255 - CoolWebTeacher / @coolwebteacher

05/10/2012 at 06:04PM

26
#256 - Endir / @Endir2

04/17/2014 at 05:29PM

26
#257 - Ram Tamtam / @ramtamtamtam

07/10/2014 at 04:04PM

26
#258 - Kyouma / @kyoumaJohn

10/14/2016 at 07:31PM

26
#259 - Akash Khan / @akash93

04/20/2017 at 11:28AM

26
#260 - Marius Ropotica / @cipmar

04/02/2024 at 06:31PM

27
#261 - Asmund / @herrasbe

11/28/2011 at 09:01PM

27
#262 - Raphaël De Giusti / @raphdg

11/30/2011 at 03:53PM

27
#263 - bluse1995 / @bluse1995

01/21/2012 at 09:25PM

27
#264 - Aaron Cruz / @mraaroncruz

02/05/2012 at 02:28PM

27
#265 - Cody Veal / @cjhveal

02/05/2012 at 07:20PM

27
#266 - Mike Korcynski / @mkorcy

02/08/2012 at 09:09PM

27
#267 - Dan Herbert / @pocketninja_au

03/01/2012 at 08:54AM

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

03/14/2012 at 10:58PM

27
#269 - Dave@Highgroove / @HighgrooveDave

05/22/2012 at 09:02PM

27
#270 - wes / @_weslly

07/15/2012 at 10:12PM