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

307 active golfers, 1190 entries

Leaderboard (lowest score wins):
19
#91 - no / @jt_vg

12/14/2011 at 02:57PM

19
#92 - sebtyp / @sebtyp

12/16/2011 at 12:31PM

19
#93 - veki / @vx_ras

02/02/2012 at 02:49PM

19
#94 - ☈king / @SharpsawDotOrg

06/24/2012 at 02:01PM

19
#95 - Marcin Sza / @coot_

11/23/2012 at 12:02AM

19
#96 - Daniel Jonsson / @DanielJonss

01/17/2013 at 07:59PM

19
#97 - Adam Bell / @adamgbell

03/26/2013 at 04:48PM

19
#98 - Joonas Pihlajamaa / @jokkebk

02/19/2014 at 11:25AM

19
#99 - kemar / @le_kemar

08/25/2014 at 12:58PM

19
#100 - Felix / @DoubleFelix_

02/24/2015 at 03:15AM

19
#101 - pftb12345 / @pftb12345

04/10/2015 at 06:58AM

19
#102 - TweetDreams / @TweetMusicians

10/16/2016 at 10:17PM

19
#103 - 杨洋 / @176795444

07/16/2017 at 09:49AM

19
#104 - J. Nick Terry / @deft_code

04/08/2019 at 10:50PM

19
#105 - Vimfiz / @vimfiz

05/02/2019 at 11:16PM

20
#106 - oliver mueller / @marcontwit

01/18/2012 at 02:21PM

20
#107 - Mikael Amborn / @mikaelamborn

01/21/2012 at 09:42PM

20
#108 - siddhy / @just_sid

02/08/2012 at 01:36PM

20
#109 - Ibrahim Tencer / @ibrahimtencer

02/12/2012 at 07:07AM

20
#110 - deris / @deris0126

04/03/2012 at 02:14PM

20
#111 - Mark Zalar / @ZalarMark

04/24/2012 at 02:20PM

20
#112 - Daniel Lundin / @danielundin

05/14/2012 at 10:56AM

20
#113 - Tom Sisk / @TomSisk

07/18/2012 at 09:03PM

20
#114 - Raúl Jara / @rauljara

07/19/2012 at 04:23PM

20
#115 - Barry Nichols / @Barry_Nichols

08/29/2013 at 10:30PM

20
#116 - Amir Kremer / @AmirKremer

03/11/2014 at 01:29PM

20
#117 - RB / @powerage88

03/22/2014 at 04:16PM

20
#118 - Martin Delille / @martinodelilo

05/10/2014 at 03:01PM

20
#119 - Sntano Euhsk / @SEuhsk

06/05/2014 at 07:16AM

20
#120 - Evan Coleman / @edc1591

06/23/2015 at 06:54PM