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):
21
#151 - playalong / @playwithit42

07/09/2014 at 08:47PM

21
#152 - Jack Z / @itszhou

06/28/2015 at 07:02PM

21
#153 - Guirec CORBEL / @GuirecCorbel

02/27/2018 at 02:27AM

21
#154 - Dax / @zacoxi

11/22/2018 at 02:17AM

21
#155 - おせよ / @OhSayYo

11/25/2019 at 09:45PM

22
#156 - William Dunand / @wdunand

11/29/2011 at 01:13AM

22
#157 - Travis Jeffery / @travisjeffery

12/02/2011 at 07:41AM

22
#158 - Tact Overflow / @muppling

12/02/2011 at 11:12AM

22
#159 - Benjamin Sullivan / @benjaminsull

12/06/2011 at 02:24PM

22
#160 - Al / @96258

12/12/2011 at 03:03PM

22
#161 - John Knight / @johnknight

12/22/2011 at 08:45PM

22
#162 - Vladyslav Marsikov / @gagabogolo

01/04/2012 at 08:16PM

22
#163 - Rob C. Grant / @rob_c_grant

01/29/2012 at 09:46PM

22
#164 - Dave E / @DaveRElliott

01/30/2012 at 09:56PM

22
#165 - chris nojima / @chrisnojima

02/10/2012 at 03:18PM

22
#166 - Jonathan Lozinski / @jlozinski

04/27/2012 at 06:17AM

22
#167 - Robin Landström / @R_Landstrom

06/06/2012 at 06:43PM

22
#168 - Chris Brown / @engineercyb

07/31/2012 at 09:13PM

22
#169 - Tyler / @tylerbindon

04/06/2013 at 04:27PM

22
#170 - Joel Taylor / @joelteon_

07/23/2013 at 07:56PM

22
#171 - cj / @cj01101

08/07/2013 at 04:17AM

22
#172 - James / @Dronak

09/12/2013 at 07:44PM

22
#173 - mnx / @mnxx

12/05/2013 at 11:27PM

22
#174 - pikaren / @REALpikaren

12/24/2013 at 02:20PM

22
#175 - Quota / @Quotad

01/22/2014 at 10:27AM

22
#176 - Omer Lachish / @rauchy

03/11/2014 at 01:21PM

22
#177 - typp / @tehtyppz

02/17/2015 at 06:31PM

22
#178 - ɐʇnɥsɐpoʇ / @todashuta

03/26/2015 at 07:25AM

22
#179 - Raj / @brshenoy

06/23/2015 at 06:42PM

22
#180 - ryo_n / @ryo_n

02/12/2016 at 07:35AM