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 307 remaining solutions by signing in and submitting your own entry
#308 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

308 active golfers, 1195 entries

Leaderboard (lowest score wins):
17
#61 - Johannes H. / @neVexa

10/30/2014 at 12:46PM

17
#62 - kimber gonzalez / @kimberlycreates

01/20/2015 at 03:22PM

17
#63 - Charles A. Bouffard / @the_cabouffard

04/05/2015 at 08:11PM

17
#64 - Jon Krause / @jkrause314

01/10/2016 at 08:34PM

17
#65 - Aleksey Zhidkov / @AlexeyZhidkov

02/29/2016 at 05:32AM

17
#66 - jj johnson / @jcassj1

08/23/2016 at 08:48AM

17
#67 - Pierre Maoui / @poupougnac

12/29/2016 at 03:42PM

17
#68 - setNull / @dadaojiemo

02/21/2017 at 02:09AM

17
#69 - Rami Hovi / @hacker_lawyer

05/27/2017 at 02:23AM

17
#70 - Bennett Bernardoni / @BBernardoni

07/03/2017 at 09:31PM

17
#71 - Turkey Man / @lvturkeyman

11/20/2017 at 02:43PM

17
#72 - BarbaJol / @drpproteus

01/02/2018 at 07:05PM

17
#73 - DHM / @DHM29978992

04/28/2018 at 10:10PM

17
#74 - Daniël De Koker / @daniel_koker

07/12/2018 at 09:37AM

17
#75 - Mihai / @mihaicristiant

12/27/2018 at 08:21AM

18
#76 - Amiel Martin / @amielmartin

12/12/2011 at 10:35PM

18
#77 - Vasil Sakarov / @vsakarov

12/28/2011 at 09:07AM

18
#78 - IPhone Notiz / @MyIPhoneNotes

12/29/2011 at 03:50PM

18
#79 - Øystein Walle / @oysteinwalle

01/01/2012 at 08:36PM

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

03/31/2012 at 06:04AM

18
#81 - Kerson Hsiao / @KersonHsiao

05/09/2012 at 09:41AM

18
#82 - Ricardo Mendes / @locks

06/25/2012 at 06:24PM

18
#83 - Casey Dwyer / @caseydwyer

10/25/2013 at 02:33AM

18
#84 - Brian Olpin / @bolpin

04/01/2014 at 02:28AM

18
#85 - Nolen Royalty / @NolenRoyalty

05/08/2014 at 08:57AM

18
#86 - lastsseldon / @lastsseldon

05/09/2014 at 10:06PM

18
#87 - mark0829 / @mark0829

02/06/2015 at 05:15AM

18
#88 - Dimitar Dimitrov / @kurkale6ka

03/16/2016 at 02:44PM

18
#89 - Remus Dalrymple / @bornintheflames

05/06/2017 at 09:05PM

18
#90 - Brendan B Amdocs / @AmdocsB

09/27/2018 at 12:00PM