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 52409a089e26e1000200006d

Ninjas Leaderboard

The two lines in "Start file" has an obfuscated email address. Second line give an index (from 1 to 30) to the chars list of the first line, for example, the first char of email (n) is in position 25, second char (i) is in position 19 and s.o.

Start file
['l', 'b', '@', 'o', 's', 'd', 'd', '.', 'L', 'a', 'm', 'o', 'f', 'c', 'm', 'g', 'r', 'v', 'r', 'i', 'o', 'e', 'a', 'j', 'e', 'n', 'i', 'n', '_', 'a']
[25, 19, 27, 23, 9, 4, 28, 8, 21, 22, 6, 24, 18, 1, 11, 29, 16, 5, 2, 17, 26, 10, 15, 20, 0, 12, 7, 13, 3, 14]
End file
['l', 'b', '@', 'o', 's', 'd', 'd', '.', 'L', 'a', 'm', 'o', 'f', 'c', 'm', 'g', 'r', 'v', 'r', 'i', 'o', 'e', 'a', 'j', 'e', 'n', 'i', 'n', '_', 'a']
[25, 19, 27, 23, 9, 4, 28, 8, 21, 22, 6, 24, 18, 1, 11, 29, 16, 5, 2, 17, 26, 10, 15, 20, 0, 12, 7, 13, 3, 14]
ninjas_Leaderboard@vimgolf.com

View Diff

2a3
> ninjas_Leaderboard@vimgolf.com

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 28 remaining solutions by signing in and submitting your own entry
#29 Joonas Pihlajamaa / jokkebk - Score: 35 - 03/27/14 @ 08:41
Goninjas_Leaderboard@vimgolf.com<Esc>ZZ

0 comments

#30 Robert Goeddel / f0rdpr3fect - Score: 35 - 11/13/15 @ 20:27
Goninjas_Leaderboard@vimgolf.com<Esc>ZZ

0 comments

#31 Hachez Floran / FloranHachez - Score: 36 - 09/28/13 @ 19:26
<CR>joninjas_Leaderboard@vimgolf.com<Esc>ZZ

0 comments

#32 Zenk Alia / zenkalia - Score: 37 - 10/17/13 @ 00:55
joninjas_Leaderboard@vimgolf.com<Esc>:wq<CR>

0 comments

#33 Bambu / bambumandinga - Score: 43 - 01/09/14 @ 05:36
"ay$+Yp:s/\v.(\d+)./\=<C-R>a[submatch(1)]/g<CR>ZZZ

0 comments

#34 RobertT / techrt2050 - Score: 45 - 05/29/14 @ 05:15
GY2pjDkx$s, <Esc>:s/, /f,3lylG$pH/g<CR>$F03x<C-X>ddH@"ZZ

0 comments

#35 Denis Otkidach / otkds - Score: 64 - 02/04/14 @ 13:03
G:pu=join(map(eval(getline(2)),'eval(getline(1))[v:val]'),'')<CR>ZZ

0 comments

#36 MP / Enemy_m - Score: 77 - 09/26/13 @ 18:40
y$:let a=<C-R>"<CR>+y$:let i=<C-R>"<CR>:for n in range(30)|pu=a[i[n]]|endfo<CR>3GqaJxq28@abXZZ

Enemy_m: Learned some tricks from ninja Learderboard !

zulolosi: 64 keystrokes pure vimscript solution: :$pu=join(map(eval(getline(2)),'eval(getline(1))[v:val]'),'')<CR>ZZ

2 comments

Created by: zulolosi

36 active golfers, 79 entries

Leaderboard (lowest score wins):
25
#1 - Urtica dioica / udioica

09/23/2013 at 09:44PM

25
#2 - Stefan Schmidt / stafue

12/06/2013 at 03:17PM

25
#3 - John Braxler / braxler

05/22/2014 at 05:12PM

29
#4 - StarkHalo / hellektor

10/07/2013 at 07:54PM

30
#5 - Matthieu Crapet / mcr05

02/26/2015 at 07:12PM

31
#6 - James T. Huggett / Jmeshka

10/02/2013 at 06:52PM

31
#7 - Petro Тrouq / zulolosi

10/03/2013 at 12:21AM

31
#8 - Tzipan / Tzipan

11/03/2013 at 12:50PM

31
#9 - pftb12345 / pftb12345

04/24/2015 at 02:37AM

31
#10 - Marcel Akkerman / MarcelAkkerman

12/28/2016 at 09:20PM

31
#11 - Alexander Koch / alex_w_k

03/24/2017 at 04:24PM

32
#12 - bunnies president / bunnies4p

10/27/2013 at 11:46AM

34
#13 - Tim Chase / gumnos

09/23/2013 at 09:05PM

34
#14 - Jaime sánchez / jashbeta

09/28/2013 at 02:37PM

35
#15 - Kai Yuan / kentyuan

09/23/2013 at 08:02PM

35
#16 - James / Dronak

09/23/2013 at 09:52PM

35
#17 - apof / 9pof

09/24/2013 at 09:58AM

35
#18 - Steve Tjoa / stevetjoa

09/25/2013 at 01:17AM

35
#19 - Steven Weller / suweller

09/26/2013 at 03:32PM

35
#20 - Oliver Christ / 0liverChrist

09/26/2013 at 08:57PM

35
#21 - Stephen Drodge / sjdrodge

09/29/2013 at 10:33PM

35
#22 - Throw Away / throwaway111111

10/01/2013 at 11:31PM

35
#23 - Tyler / tylerbindon

10/20/2013 at 08:44PM

35
#24 - Jack Z / itszhou

10/29/2013 at 06:32AM

35
#25 - mwcz / mwcz

11/01/2013 at 06:09PM

35
#26 - Yann Moisan / YannMoisan

01/03/2014 at 08:05PM

35
#27 - cj / cj01101

02/04/2014 at 11:18PM

35
#28 - devper94 / devper94

03/16/2014 at 09:57AM

35
#29 - Joonas Pihlajamaa / jokkebk

03/27/2014 at 08:41AM

35
#30 - Robert Goeddel / f0rdpr3fect

11/13/2015 at 08:27PM

36
#31 - Hachez Floran / FloranHachez

09/28/2013 at 07:26PM

37
#32 - Zenk Alia / zenkalia

10/17/2013 at 12:55AM

43
#33 - Bambu / bambumandinga

01/09/2014 at 05:36AM

45
#34 - RobertT / techrt2050

05/29/2014 at 05:15AM

64
#35 - Denis Otkidach / otkds

02/04/2014 at 01:03PM

77
#36 - MP / Enemy_m

09/26/2013 at 06:40PM