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):
17
#61 - Johannes H. / @neVexa

10/30/2014 at 12:46PM

17
#62 - kimber gonzalez / @kimberlycreates

01/20/2015 at 03:22PM

17
#63 - Charles A. Bouffard / @the_cabouffard

04/05/2015 at 08:11PM

17
#64 - Jon Krause / @jkrause314

01/10/2016 at 08:34PM

17
#65 - Aleksey Zhidkov / @AlexeyZhidkov

02/29/2016 at 05:32AM

17
#66 - jj johnson / @jcassj1

08/23/2016 at 08:48AM

17
#67 - Pierre Maoui / @p_maoui

12/29/2016 at 03:42PM

17
#68 - setNull / @dadaojiemo

02/21/2017 at 02:09AM

17
#69 - Rami Hovi / @hacker_lawyer

05/27/2017 at 02:23AM

17
#70 - Bennett Bernardoni / @BBernardoni

07/03/2017 at 09:31PM

17
#71 - Turkey Man / @lvturkeyman

11/20/2017 at 02:43PM

17
#72 - BarbaJol / @drpproteus

01/02/2018 at 07:05PM

17
#73 - DHM / @DHM29978992

04/28/2018 at 10:10PM

17
#74 - Daniël De Koker / @daniel_koker

07/12/2018 at 09:37AM

17
#75 - Mihai / @mihaicristiant

12/27/2018 at 08:21AM

17
#76 - Martin Delille / @martinodelilo

08/22/2019 at 10:20AM

17
#77 - Melvin Cheung / @MelvinCheung

11/12/2019 at 03:33AM

17
#78 - Viktor Styrud / @ViktorStyrud

11/19/2019 at 09:07AM

17
#79 - Lory / @Lory46845742

11/19/2019 at 03:36PM

17
#80 - Miłosz Łakomy / @foobar01123

12/05/2019 at 12:57PM

17
#81 - Jean George / @JeanGeo20504212

01/04/2022 at 10:41PM

17
#82 - blabla zincou / @BZincou

04/13/2022 at 09:38PM

17
#83 - russellzhaomao / @russellzhaomao

05/25/2022 at 04:37AM

17
#84 - Janzen / @__Coos

09/22/2022 at 09:38AM

17
#85 - 刘宏亮 / @AkeyCoy

09/24/2022 at 02:52PM

17
#86 - Vincent Staunton, P.I. / @vincestauntonvt

11/04/2022 at 12:58PM

17
#87 - Peppa Pig / @PeppaPigSg

06/12/2024 at 05:29AM

17
#88 - Petro Mudrievskyj / @petemud

07/01/2024 at 01:05PM

17
#89 - Suhaib Murshid / @suhaibm

09/28/2024 at 09:05AM

18
#90 - Amiel Martin / @amielmartin

12/12/2011 at 10:35PM