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):
22
#181 - Chenut Ludovic / @7Brwa7

04/04/2016 at 10:55AM

22
#182 - Zhihong Liu / @pieapple03

02/21/2017 at 02:30AM

22
#183 - Paul Draghicescu / @pdragy

05/10/2018 at 11:49PM

22
#184 - Miko / @_m_ik_o_

10/13/2019 at 09:23AM

22
#185 - iBhagwan / @iiBhagwan

06/03/2020 at 10:15PM

23
#186 - Matt Woelk / @MattWoelk

11/29/2011 at 02:45AM

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

12/01/2011 at 06:27PM

23
#188 - A / @tndrnt

12/07/2011 at 07:05PM

23
#189 - jearsh / @jearsh

12/15/2011 at 09:00PM

23
#190 - Rik Lomas / @riklomas

12/18/2011 at 11:54PM

23
#191 - George South / @ecuageo

12/25/2011 at 02:00AM

23
#192 - Lin Yangyang / @canoelyy

02/02/2012 at 07:00AM

23
#193 - Jonathan C. Dietrich / @jcdietrich

02/08/2012 at 03:42AM

23
#194 - Morgan Sutherland / @msutherl

02/08/2012 at 07:38AM

23
#195 - Alan Oliver / @alol

02/15/2012 at 12:48AM

23
#196 - じょんあば / @john_ababa

02/29/2012 at 07:51AM

23
#197 - Nolen Royalty / @NolenRoyalty

04/22/2012 at 07:46AM

23
#198 - Nikita Mikhaylov / @nslqqq

04/25/2012 at 01:17PM

23
#199 - Christian Gaida / @chgaida

05/13/2012 at 06:49PM

23
#200 - Joe Nelson / @begriffs

08/29/2012 at 01:44AM

23
#201 - moo goo / @m00g000

07/01/2013 at 04:12PM

23
#202 - powertomato / @powertomato

07/08/2013 at 11:05PM

23
#203 - Dom Armstrong / @dom_cycleface

08/23/2013 at 12:31PM

23
#204 - Oliver Christ / @0liverChrist

11/13/2013 at 01:04PM

23
#205 - Edgar Hipp / @EdgarHipp

11/19/2013 at 01:58PM

23
#206 - gary.klindt@googlema / @garstekli

11/21/2013 at 11:24PM

23
#207 - David J Siefert / @davidjsiefert

12/20/2013 at 01:00AM

23
#208 - Eric Potter / @pottereric

12/20/2013 at 01:41PM

23
#209 - Timothy Lin / @lzh9102

03/07/2014 at 11:29PM

23
#210 - Walker Boh / @walker_boh

10/12/2015 at 09:37AM