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):
23
#181 - Jonathan C. Dietrich / @jcdietrich

02/08/2012 at 03:42AM

23
#182 - Morgan Sutherland / @msutherl

02/08/2012 at 07:38AM

23
#183 - Alan Oliver / @alol

02/15/2012 at 12:48AM

23
#184 - 無ん垢の叫び / @john_ababa

02/29/2012 at 07:51AM

23
#185 - Nolen Royalty / @NolenRoyalty

04/22/2012 at 07:46AM

23
#186 - Nikita Mikhaylov / @nslqqq

04/25/2012 at 01:17PM

23
#187 - Christian Gaida / @chgaida

05/13/2012 at 06:49PM

23
#188 - Joe Nelson / @begriffs

08/29/2012 at 01:44AM

23
#189 - moo goo / @m00g000

07/01/2013 at 04:12PM

23
#190 - powertomato / @powertomato

07/08/2013 at 11:05PM

23
#191 - Dom Armstrong / @dom_cycleface

08/23/2013 at 12:31PM

23
#192 - Oliver Christ / @0liverChrist

11/13/2013 at 01:04PM

23
#193 - Edgar Hipp / @EdgarHipp

11/19/2013 at 01:58PM

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

11/21/2013 at 11:24PM

23
#195 - David J Siefert / @davidjsiefert

12/20/2013 at 01:00AM

23
#196 - Eric Potter / @pottereric

12/20/2013 at 01:41PM

23
#197 - Timothy Lin / @lzh9102

03/07/2014 at 11:29PM

23
#198 - Walker Boh / @walker_boh

10/12/2015 at 09:37AM

23
#199 - Mayank Suman / @mayank_suman

12/30/2016 at 05:01AM

23
#200 - Minyi Zhong / @minyi_zhong

12/03/2019 at 10:36PM

24
#201 - Mattiassich Ákos / @mattiassicha

11/29/2011 at 07:30PM

24
#202 - Daniel Harrington / @rubiii

12/10/2011 at 08:50PM

24
#203 - Iori ONDA / @120reset

12/14/2011 at 03:53AM

24
#204 - Raj Sahae / @rajsahae

12/20/2011 at 11:47PM

24
#205 -  Ikhsan Maulana / @ixandidu

01/07/2012 at 05:23AM

24
#206 - Christopher Brew / @Seph1rothVII

01/10/2012 at 01:01AM

24
#207 - Scott Schlesier / @sschlesier

02/21/2012 at 03:38PM

24
#208 - Jeffrey Wilcke / @jeffehh

03/15/2012 at 11:13PM

24
#209 - 蒼時弦也 / @elct9620

03/29/2012 at 12:46AM

24
#210 - Eric Söderström / @eksoderstrom

08/15/2012 at 08:48PM