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
#1 - Tim Chase / @gumnos

11/28/2011 at 07:11PM

17
#2 - Mathias Bynens  / @mathias

11/28/2011 at 07:13PM

17
#3 - rajesh parvathaneni / @rparvathaneni

11/28/2011 at 08:18PM

17
#4 - Gabriel Barta / @gbarta

12/02/2011 at 12:14PM

17
#5 - Utkarsh Kukreti / @utkarshkukreti

12/03/2011 at 03:52PM

17
#6 - Balkoth / @_Balkoth_

12/03/2011 at 09:01PM

17
#7 - Maciej Suchecki / @mcSuchecki

12/04/2011 at 07:23PM

17
#8 - You-Siang Lin / @yslinnctu

12/05/2011 at 05:39AM

17
#9 - 0x5042 / @0x5042

12/07/2011 at 08:19PM

17
#10 - h_east (トロッコ6個) / @h_east

12/11/2011 at 05:29PM

17
#11 - Jakub Arnold / @darthdeus

12/13/2011 at 09:25AM

17
#12 - Alain Gilbert / @alain_gilbert

12/15/2011 at 10:26PM

17
#13 - Pei-Lun Lee / @ypcatw

12/16/2011 at 02:37PM

17
#14 - Brian Buckley / @bbuckley

12/18/2011 at 02:02PM

17
#15 - Federico Galassi / @federicogalassi

12/18/2011 at 09:18PM

17
#16 - Mihai Crăiță / @mihai_craita

12/20/2011 at 02:05PM

17
#17 - Sean O'Hara / @_sohara

12/20/2011 at 08:28PM

17
#18 - John Anderson / @opejn

12/24/2011 at 04:26AM

17
#19 - Justin Love / @wondible

12/24/2011 at 05:44PM

17
#20 - Ed Gibbs / @edward_gibbs

12/25/2011 at 12:30AM

17
#21 - twobit / @_2bt

01/04/2012 at 12:43AM

17
#22 - Felipe Talavera / @flype

01/09/2012 at 12:26AM

17
#23 - Abdel Said / @abdelsaid

01/14/2012 at 11:52PM

17
#24 - Albin Olsson / @sentenser

01/15/2012 at 11:09PM

17
#25 - Song Zheng / @songz

01/19/2012 at 10:47PM

17
#26 - kcliu / @kcliutw

01/28/2012 at 12:11AM

17
#27 - Chris Geihsler / @seejee

01/31/2012 at 10:42PM

17
#28 - Matthew / @so3arbelnox

02/02/2012 at 03:01AM

17
#29 - Renat Aksitov / @Korvin79

02/18/2012 at 06:29AM

17
#30 - David Sanders / @SandersCD

02/19/2012 at 05:42PM