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):
18
#91 - Vasil Sakarov / @vsakarov

12/28/2011 at 09:07AM

18
#92 - IPhone Notiz / @MyIPhoneNotes

12/29/2011 at 03:50PM

18
#93 - Øystein Walle / @oysteinwalle

01/01/2012 at 08:36PM

18
#94 - not so punk :] / @notsopunk

03/31/2012 at 06:04AM

18
#95 - Kerson Hsiao / @KersonHsiao

05/09/2012 at 09:41AM

18
#96 - Ricardo Mendes / @locks

06/25/2012 at 06:24PM

18
#97 - Casey Dwyer / @caseydwyer

10/25/2013 at 02:33AM

18
#98 - Brian Olpin / @bolpin

04/01/2014 at 02:28AM

18
#99 - Nolen Royalty / @NolenRoyalty

05/08/2014 at 08:57AM

18
#100 - lastsseldon / @lastsseldon

05/09/2014 at 10:06PM

18
#101 - mark0829 / @mark0829

02/06/2015 at 05:15AM

18
#102 - Dimitar Dimitrov / @kurkale6ka

03/16/2016 at 02:44PM

18
#103 - Remus Dalrymple / @bornintheflames

05/06/2017 at 09:05PM

18
#104 - Brendan B Amdocs / @AmdocsB

09/27/2018 at 12:00PM

18
#105 - Chester Yap / @Chest_ErYap

07/20/2019 at 08:19PM

18
#106 - Michel Viktor / @tomkpz

08/11/2021 at 07:52PM

19
#107 - no / @jt_vg

12/14/2011 at 02:57PM

19
#108 - sebtyp / @sebtyp

12/16/2011 at 12:31PM

19
#109 - veki / @vx_ras

02/02/2012 at 02:49PM

19
#110 - ☈king / @SharpsawDotOrg

06/24/2012 at 02:01PM

19
#111 - Marcin Szamotulski / @me_coot

11/23/2012 at 12:02AM

19
#112 - Daniel Jonsson / @DanielJonss

01/17/2013 at 07:59PM

19
#113 - Adam Bell / @adamgbell

03/26/2013 at 04:48PM

19
#114 - Joonas Pihlajamaa / @jokkebk

02/19/2014 at 11:25AM

19
#115 - kemar / @le_kemar

08/25/2014 at 12:58PM

19
#116 - Felix / @DoubleFelix_

02/24/2015 at 03:15AM

19
#117 - pftb12345 / @pftb12345

04/10/2015 at 06:58AM

19
#118 - TweetDreams / @TweetMusicians

10/16/2016 at 10:17PM

19
#119 - 杨洋 / @176795444

07/16/2017 at 09:49AM

19
#120 - J. Nick Terry / @deft_code

04/08/2019 at 10:50PM