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):
22
#151 - Vladyslav Marsikov / @gagabogolo

01/04/2012 at 08:16PM

22
#152 - Rob C. Grant / @rob_c_grant

01/29/2012 at 09:46PM

22
#153 - Dave E / @DaveRElliott

01/30/2012 at 09:56PM

22
#154 - chris nojima / @chrisnojima

02/10/2012 at 03:18PM

22
#155 - Jonathan Lozinski / @jlozinski

04/27/2012 at 06:17AM

22
#156 - Robin Landström / @R_Landstrom

06/06/2012 at 06:43PM

22
#157 - Chris Brown / @engineercyb

07/31/2012 at 09:13PM

22
#158 - Tyler / @tylerbindon

04/06/2013 at 04:27PM

22
#159 - Joel Taylor / @joelteon_

07/23/2013 at 07:56PM

22
#160 - cj / @cj01101

08/07/2013 at 04:17AM

22
#161 - James / @Dronak

09/12/2013 at 07:44PM

22
#162 - mnx / @mnxx

12/05/2013 at 11:27PM

22
#163 - pikaren / @REALpikaren

12/24/2013 at 02:20PM

22
#164 - Quota / @Quotad

01/22/2014 at 10:27AM

22
#165 - Omer Lachish / @rauchy

03/11/2014 at 01:21PM

22
#166 - typp / @tehtyppz

02/17/2015 at 06:31PM

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

03/26/2015 at 07:25AM

22
#168 - Raj / @brshenoy

06/23/2015 at 06:42PM

22
#169 - ryo_n / @ryo_n

02/12/2016 at 07:35AM

22
#170 - Chenut Ludovic / @7Brwa7

04/04/2016 at 10:55AM

22
#171 - Zhihong Liu / @pieapple03

02/21/2017 at 02:30AM

22
#172 - Paul Draghicescu / @pdragy

05/10/2018 at 11:49PM

22
#173 - Miko / @_m_ik_o_

10/13/2019 at 09:23AM

23
#174 - Matt Woelk / @MattWoelk

11/29/2011 at 02:45AM

23
#175 - Dühöngő / @aswna

12/01/2011 at 06:27PM

23
#176 - A / @tndrnt

12/07/2011 at 07:05PM

23
#177 - jearsh / @jearsh

12/15/2011 at 09:00PM

23
#178 - Rik Lomas / @riklomas

12/18/2011 at 11:54PM

23
#179 - George South / @ecuageo

12/25/2011 at 02:00AM

23
#180 - Lin Yangyang / @canoelyy

02/02/2012 at 07:00AM