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):
19
#121 - Vimfiz / @vimfiz

05/02/2019 at 11:16PM

19
#122 - pysnow530 / @pysnow530

11/27/2019 at 05:19AM

20
#123 - oliver mueller / @marcontwit

01/18/2012 at 02:21PM

20
#124 - Mikael Amborn / @mikaelamborn

01/21/2012 at 09:42PM

20
#125 - siddhy / @just_sid

02/08/2012 at 01:36PM

20
#126 - Ibrahim Tencer / @ibrahimtencer

02/12/2012 at 07:07AM

20
#127 - deris / @deris0126

04/03/2012 at 02:14PM

20
#128 - Mark Zalar / @ZalarMark

04/24/2012 at 02:20PM

20
#129 - Daniel Lundin / @danielundin

05/14/2012 at 10:56AM

20
#130 - Tom Sisk / @TomSisk

07/18/2012 at 09:03PM

20
#131 - Raúl Jara / @rauljara

07/19/2012 at 04:23PM

20
#132 - Barry Nichols / @Barry_Nichols

08/29/2013 at 10:30PM

20
#133 - Amir Kremer / @AmirKremer

03/11/2014 at 01:29PM

20
#134 - RB / @powerage88

03/22/2014 at 04:16PM

20
#135 - Sntano Euhsk / @SEuhsk

06/05/2014 at 07:16AM

20
#136 - Evan Coleman / @edc1591

06/23/2015 at 06:54PM

20
#137 - Bill Ruddock / @biinari

10/26/2016 at 04:51AM

20
#138 - Yann / @yannstad

03/02/2017 at 09:11AM

20
#139 - Tomas Sikula / @tomsmicroblog

05/27/2017 at 01:19PM

20
#140 - demouo / @demouo

11/15/2024 at 06:22AM

21
#141 - vimja / @vimja666

12/02/2011 at 10:16PM

21
#142 - celery rho gamma / @rentalcustard

12/21/2011 at 05:37PM

21
#143 - Xavier Nayrac / @lkdjiin

01/02/2012 at 11:07AM

21
#144 - Deniz Ugurlu / @Den1z

01/31/2012 at 12:17AM

21
#145 - Dan Huang / @yuzeh

02/16/2012 at 07:32PM

21
#146 - shutl_test / @shutl_test

06/06/2012 at 08:08PM

21
#147 - Petri Rosenström / @wuzuuz

08/21/2012 at 04:46PM

21
#148 - A / @Tower_1980

07/28/2013 at 11:14AM

21
#149 - Yann Moisan / @YannMoisan

08/29/2013 at 12:28PM

21
#150 - Guy Rozen / @HolyEggplant

03/11/2014 at 01:22PM