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

41 active golfers, 99 entries

Leaderboard (lowest score wins):
35
#31 - devper94 / @devper94

03/16/2014 at 09:57AM

35
#32 - Joonas Pihlajamaa / @jokkebk

03/27/2014 at 08:41AM

35
#33 - Robert Goeddel / @f0rdpr3fect

11/13/2015 at 08:27PM

35
#34 - Kanmuruuruu / @Kanmuruuruu

04/06/2024 at 09:24PM

36
#35 - Hachez Floran / @FloranHachez

09/28/2013 at 07:26PM

36
#36 - Awakening George / @GeorgeC_monster

12/26/2018 at 08:34PM

37
#37 - Zenk Alia / @zenkalia

10/17/2013 at 12:55AM

43
#38 - Bambu / @bambumandinga

01/09/2014 at 05:36AM

45
#39 - RobertT / @techrt2050

05/29/2014 at 05:15AM

64
#40 - Denis Otkidach / @otkds

02/04/2014 at 01:03PM

77
#41 - MP / @Enemy_m

09/26/2013 at 06:40PM