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):
20
#121 - Raúl Jara / @rauljara

07/19/2012 at 04:23PM

20
#122 - Barry Nichols / @Barry_Nichols

08/29/2013 at 10:30PM

20
#123 - Amir Kremer / @AmirKremer

03/11/2014 at 01:29PM

20
#124 - RB / @powerage88

03/22/2014 at 04:16PM

20
#125 - Sntano Euhsk / @SEuhsk

06/05/2014 at 07:16AM

20
#126 - Evan Coleman / @edc1591

06/23/2015 at 06:54PM

20
#127 - Bill Ruddock / @biinari

10/26/2016 at 04:51AM

20
#128 - Yann / @yannstad

03/02/2017 at 09:11AM

20
#129 - Tomas Sikula / @tomsmicroblog

05/27/2017 at 01:19PM

21
#130 - vimja / @vimja666

12/02/2011 at 10:16PM

21
#131 - celery rho gamma / @rentalcustard

12/21/2011 at 05:37PM

21
#132 - Xavier Nayrac / @lkdjiin

01/02/2012 at 11:07AM

21
#133 - Deniz Ugurlu / @Den1z

01/31/2012 at 12:17AM

21
#134 - Dan Huang / @yuzeh

02/16/2012 at 07:32PM

21
#135 - shutl_test / @shutl_test

06/06/2012 at 08:08PM

21
#136 - Petri Rosenström / @wuzuuz

08/21/2012 at 04:46PM

21
#137 - A / @Tower_1980

07/28/2013 at 11:14AM

21
#138 - Yann Moisan / @YannMoisan

08/29/2013 at 12:28PM

21
#139 - Guy Rozen / @HolyEggplant

03/11/2014 at 01:22PM

21
#140 - playalong / @playwithit42

07/09/2014 at 08:47PM

21
#141 - Jack Z / @itszhou

06/28/2015 at 07:02PM

21
#142 - Guirec CORBEL / @GuirecCorbel

02/27/2018 at 02:27AM

21
#143 - Dax / @zacoxi

11/22/2018 at 02:17AM

21
#144 - お-せ-よ- / @OhSayYo

11/25/2019 at 09:45PM

22
#145 - William Dunand / @wdunand

11/29/2011 at 01:13AM

22
#146 - Travis Jeffery / @travisjeffery

12/02/2011 at 07:41AM

22
#147 - Tact Overflow / @muppling

12/02/2011 at 11:12AM

22
#148 - Benjamin Sullivan / @benjaminsull

12/06/2011 at 02:24PM

22
#149 - Al / @96258

12/12/2011 at 03:03PM

22
#150 - John Knight / @johnknight

12/22/2011 at 08:45PM