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):
24
#211 - shpoont / @shpoont

02/05/2013 at 07:12AM

24
#212 - Bunwut Tson / @NbTson

09/01/2013 at 12:55PM

24
#213 - Hachez Floran / @FloranHachez

09/03/2013 at 12:08PM

24
#214 - brett / @brettyukich

09/21/2013 at 02:23AM

24
#215 - Daniel Marjenburgh / @dmarjenburgh

11/17/2013 at 01:10PM

24
#216 - Alan Sherman / @InfoLeak117

06/05/2014 at 06:46PM

24
#217 - Sabiki94@ブルスクの人 / @_jptomoya

10/18/2014 at 12:11PM

24
#218 - Zach Gulde / @zgulde

02/29/2016 at 05:53AM

24
#219 - glepha / @glepha_vim

03/23/2016 at 05:23AM

24
#220 - Jeremiah Goyette / @JeremiahGoyette

08/03/2016 at 06:38AM

24
#221 - trx / @trxdbg

10/27/2016 at 01:45PM

24
#222 - Austin Ware / @AustinWare17

03/16/2018 at 01:22AM

25
#223 - Shannon / @shannonskipper

11/30/2011 at 12:47AM

25
#224 - Philippe Mongeau / @phmongeau

12/06/2011 at 02:44AM

25
#225 - Dj Vimgolf / @dj_vimgolf

01/05/2012 at 02:23AM

25
#226 - Adrien Friggeri / @qelf

02/25/2012 at 05:20AM

25
#227 - Pavel Nikitin / @pavel_nikitin

03/31/2012 at 08:10PM

25
#228 - David L Goldberg / @DavidLGoldberg1

09/20/2013 at 04:09AM

25
#229 - A. N. / @arez42

10/24/2013 at 06:51AM

25
#230 - eBrnd / @eBrnd

11/03/2014 at 06:00PM

25
#231 - Clark DuVall / @theclarkatron

05/19/2015 at 04:44AM

25
#232 - Gerald Tilma / @GeraldTilma

10/20/2015 at 01:48AM

25
#233 - Vaisian / @Vaisian

07/02/2016 at 09:05PM

25
#234 - Will / @obiwan__k3n00bi

07/31/2016 at 10:04PM

25
#235 - OlivierLi / @LiZhongSin

11/17/2016 at 02:27PM

26
#236 - Dmitry Teslenko / @krab_mozga

11/29/2011 at 06:55AM

26
#237 - Petro Verkhogliad / @vpetro

12/05/2011 at 08:52AM

26
#238 - Frank Perez / @frankperez87

12/21/2011 at 02:01PM

26
#239 - Hawk Newton / @hawknewton

04/24/2012 at 12:14PM

26
#240 - CoolWebTeacher / @coolwebteacher

05/10/2012 at 06:04PM