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

321 active golfers, 1260 entries

Leaderboard (lowest score wins):
27
#271 - Aaron / @_Lordofthevoid_

12/07/2019 at 09:02PM

28
#272 - Gregory Igelmund / @grekko

12/06/2011 at 09:55PM

28
#273 - Toto l'haricot / @nico_le_terribl

12/13/2011 at 10:22PM

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

12/22/2011 at 03:20AM

28
#275 - akira_simpson / @akira_simpson

02/02/2012 at 11:40AM

28
#276 - Jay Stotz / @jstotz

02/05/2012 at 07:21PM

28
#277 - Reed Riley / @ReedRile

08/12/2012 at 10:07PM

28
#278 - Chris LeBlanc / @cleblanc87

09/25/2013 at 10:38PM

28
#279 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:05AM

29
#280 - Kiss György / @Walkman_

01/08/2012 at 04:51AM

29
#281 - James Chiang / @jamesjn5

04/01/2012 at 03:53AM

29
#282 - Nathan Manousos / @trafnar

04/02/2012 at 05:36AM

29
#283 - Rod Knowlton / @codelahoma

04/24/2012 at 01:13PM

29
#284 - Golf Sinteppadon / @minigolf2000

04/27/2012 at 10:33PM

29
#285 - Alan / @aluong91

07/17/2012 at 08:19AM

29
#286 - robin hafen / @rohafen

09/28/2012 at 02:18PM

29
#287 - Almog / @almog

03/11/2014 at 01:12PM

30
#288 - Tom von Clef / @tomvonclef

12/16/2011 at 07:27PM

30
#289 - Raphael Randschau / @nicolai86

12/25/2011 at 02:28PM

30
#290 - ところたん / @tokoro10g

04/14/2014 at 02:18AM

31
#291 - Matthew Cupps / @matthewcupps

12/20/2011 at 09:48PM

31
#292 - Jason Felice / @eraserhd

12/21/2011 at 01:00AM

31
#293 - Sergi Sorribas / @lerovitch

12/22/2011 at 12:19PM

31
#294 - Tara Bass / @tara_bass

12/23/2011 at 06:10AM

31
#295 - ümit kablan / @udslk

03/11/2012 at 07:53AM

31
#296 - Jomo / @yoyoyojomo

03/14/2012 at 05:47PM

32
#297 - arye lukashevski / @aryelukashevski

01/14/2012 at 05:59PM

32
#298 - Mike Rayner / @mikesfake

01/23/2012 at 06:57PM

33
#299 - Chris Penkett / @chrispenkett

04/03/2012 at 04:52PM

33
#300 - vansan / @VinceVansan

08/22/2012 at 10:26AM