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):
23
#211 - Mayank Suman / @mayank_suman

12/30/2016 at 05:01AM

23
#212 - Minyi Zhong / @minyi_zhong

12/03/2019 at 10:36PM

23
#213 - asirago / @asiragoo

12/14/2023 at 03:45AM

24
#214 - Mattiassich Ákos / @mattiassicha

11/29/2011 at 07:30PM

24
#215 - Daniel Harrington / @rubiii

12/10/2011 at 08:50PM

24
#216 - Iori ONDA / @120reset

12/14/2011 at 03:53AM

24
#217 - Raj Sahae / @rajsahae

12/20/2011 at 11:47PM

24
#218 -  Ikhsan Maulana / @ixandidu

01/07/2012 at 05:23AM

24
#219 - Christopher Brew / @Seph1rothVII

01/10/2012 at 01:01AM

24
#220 - Scott Schlesier / @sschlesier

02/21/2012 at 03:38PM

24
#221 - Jeffrey Wilcke / @jeffehh

03/15/2012 at 11:13PM

24
#222 - 蒼時弦也 / @elct9620

03/29/2012 at 12:46AM

24
#223 - Eric Söderström / @eksoderstrom

08/15/2012 at 08:48PM

24
#224 - shpoont / @shpoont

02/05/2013 at 07:12AM

24
#225 - Bunwut Tson / @NbTson

09/01/2013 at 12:55PM

24
#226 - Hachez Floran / @FloranHachez

09/03/2013 at 12:08PM

24
#227 - brett / @brettyukich

09/21/2013 at 02:23AM

24
#228 - Daniel Marjenburgh / @dmarjenburgh

11/17/2013 at 01:10PM

24
#229 - Alan Sherman / @InfoLeak117

06/05/2014 at 06:46PM

24
#230 - jptomoya / @_jptomoya

10/18/2014 at 12:11PM

24
#231 - Zach Gulde / @zgulde

02/29/2016 at 05:53AM

24
#232 - glepha / @glepha_vim

03/23/2016 at 05:23AM

24
#233 - Jeremiah Goyette / @JeremiahGoyette

08/03/2016 at 06:38AM

24
#234 - trx / @trxdbg

10/27/2016 at 01:45PM

24
#235 - Austin Ware / @AustinWare17

03/16/2018 at 01:22AM

24
#236 - jake / @eyes_low

02/26/2020 at 07:55PM

25
#237 - Shannon / @shannonskipper

11/30/2011 at 12:47AM

25
#238 - Philippe Mongeau / @phmongeau

12/06/2011 at 02:44AM

25
#239 - Dj Vimgolf / @dj_vimgolf

01/05/2012 at 02:23AM

25
#240 - Adrien Friggeri / @qelf

02/25/2012 at 05:20AM