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):
27
#271 - Paul Roberts / @psxpau1

07/31/2012 at 05:03PM

27
#272 - Pedro Franceschi / @pedroh96

02/06/2013 at 02:42AM

27
#273 - curist / @curist

07/09/2013 at 09:04AM

27
#274 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 04:41AM

27
#275 - Aaron Bieber / @aaronbieber

07/16/2013 at 11:33PM

27
#276 - Przemysław Kamiński / @CXLII

08/13/2013 at 03:12PM

27
#277 - Solar Powered Robot / @moskrin

05/01/2014 at 03:52PM

27
#278 - Tom Gilligan / @sargegood

07/07/2014 at 11:07PM

27
#279 - Tj / @yrddy

08/19/2014 at 02:52AM

27
#280 - Jake Worth / @jwworth

10/11/2014 at 06:01PM

27
#281 - SilentFl / @Silent_Fl

01/27/2015 at 02:16PM

27
#282 - Daniel / @Daniel00288663

03/30/2017 at 01:32PM

27
#283 - Clyde Fare / @ClydeFare

04/14/2017 at 12:08PM

27
#284 - Aaron / @_Lordofthevoid_

12/07/2019 at 09:02PM

28
#285 - Gregory Igelmund / @grekko

12/06/2011 at 09:55PM

28
#286 - Toto l'haricot / @nico_le_terribl

12/13/2011 at 10:22PM

28
#287 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:20AM

28
#288 - akira_simpson / @akira_simpson

02/02/2012 at 11:40AM

28
#289 - Jay Stotz / @jstotz

02/05/2012 at 07:21PM

28
#290 - Reed Riley / @ReedRile

08/12/2012 at 10:07PM

28
#291 - Chris LeBlanc / @cleblanc87

09/25/2013 at 10:38PM

28
#292 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:05AM

29
#293 - Kiss György / @Walkman_

01/08/2012 at 04:51AM

29
#294 - James Chiang / @jamesjn5

04/01/2012 at 03:53AM

29
#295 - Nathan Manousos / @trafnar

04/02/2012 at 05:36AM

29
#296 - Rod Knowlton / @codelahoma

04/24/2012 at 01:13PM

29
#297 - Golf Sinteppadon / @minigolf2000

04/27/2012 at 10:33PM

29
#298 - Alan / @aluong91

07/17/2012 at 08:19AM

29
#299 - robin hafen / @rohafen

09/28/2012 at 02:18PM

29
#300 - Almog / @almog

03/11/2014 at 01:12PM