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 59713ae5bb056f16b6000002

Hello ${world}

Migrate a JavaScript String from concatenation to ES6 interpolation.

Start file
let world = 'world';
console.log('hello ' + world);
console.log('bye ' + world + '!');
End file
let world = 'world';
console.log(`hello ${world}`);
console.log(`bye ${world}!`);

View Diff

2,3c2,3
< console.log('hello ' + world);
< console.log('bye ' + world + '!');
---
> console.log(`hello ${world}`);
> console.log(`bye ${world}!`);

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 36 remaining solutions by signing in and submitting your own entry
#37 Adam Kożuch / adamkozuch - Score: 35 - 08/16/17 @ 07:13
jf'r`j.;ctw${<Esc>kl.ea}`<Esc>j3Xr]r}2lr`ZZ

0 comments

#38 Rahul Gupta / pezcoder - Score: 37 - 07/26/17 @ 21:16
qqj0f'r`;ctw${<Esc>f)cTd}`<Esc>jkq@qi!<Esc> :wqa<CR>

0 comments

#39 黒澤亮二 / rjkuro - Score: 39 - 07/21/17 @ 14:49
jf'qqr`;4dli${<Esc>ea}`<Esc>q/'<CR>@qi!<Esc>ll5dlx:wq<CR>

0 comments

#40 Clay Thomas / CHThomas95 - Score: 46 - 07/21/17 @ 22:06
qsjf';v3lc${<Esc>q0@seldf'i}<Esc>kla}'<Esc>Vj:s/'/`/g<CR>:wq<CR>

0 comments

#41 Juan Colacelli / juancolacelli - Score: 46 - 07/23/17 @ 11:44
j:,$s/'/`/g<CR>:%s/` \(.*\))/${world}`)/g<CR>7wa!<Esc>ZZ

0 comments

#42 Paul Inc / hiniol1982 - Score: 61 - 08/01/17 @ 20:31
:2,3s/'/`/g<CR>/w.*d<CR>:2,3s//${\0}<CR>f dt+xf dt`xkF ;;dt$i <Esc>f}a`<Esc>ZZ

0 comments

#43 杨洋 / 176795444 - Score: 66 - 08/13/17 @ 08:40
jf'r`f'R${<Esc>lxxei}u<Esc>ua}`<Esc>/'<CR>r`f'R${<Del><Del><Esc>2ejjjjhhhhhhhea}<Del><Del><Del><Del><Right><Esc>r<Esc>lr`ZZ

0 comments

#44 Vasily Novikov / helensw06796314 - Score: 70 - 08/07/17 @ 17:20
:%s/' + /${/g<CR>eeeeeeelxxxc}u<BS><Esc>ur}klli}`j<BS><Esc>j<Left>r`<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>r`<Up>r`<Esc>:wq<CR>

0 comments

#45 Robbin Schepers / Roboroads - Score: 137 - 07/21/17 @ 11:51
kjf+_f+a<BS><BS><BS>${<Del><Esc>LJkA<Esc>jkjkhi}'<BS>`<Esc>hhjkhhhhhhhhhhhh<BS>li<BS>`<Esc>kjjli<BS>`<Esc>llllllllllllllllllvF'nhhhhhhhhhhhh$hhhhhhhhhhhhhhhhhc${world{<BS>}<Del>`<BS>!`<Esc>:w<CR>:wq<CR>

0 comments

Created by: juancolacelli

45 active golfers, 121 entries

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

07/21/2017 at 02:36AM

24
#2 - Jacob Buete / JBuete

07/21/2017 at 04:36AM

24
#3 - Smylers / Smylers2

07/21/2017 at 06:37AM

24
#4 - Anne Pacalet / _Anne_P

07/21/2017 at 08:08AM

24
#5 - Gabriel Siqueira / Gabriel_HSiq

07/21/2017 at 12:04PM

24
#6 - Peter Chynoweth / pcchynoweth

07/21/2017 at 09:14PM

24
#7 - Petro Тrouq / zulolosi

07/24/2017 at 08:51AM

24
#8 - Saki Gw / Sakigw

07/26/2017 at 11:53AM

24
#9 - Song Zheng / songz

07/26/2017 at 06:45PM

24
#10 - Vim Girl / vim_girl

07/26/2017 at 07:20PM

24
#11 - devoh / devvohh

07/29/2017 at 08:35AM

24
#12 - Karol Łukaszewicz / Karolukaszewicz

07/31/2017 at 12:21PM

24
#13 - John Braxler / braxler

07/31/2017 at 03:24PM

24
#14 - Will / obiwan__k3n00bi

08/03/2017 at 02:52AM

24
#15 - Ky Statham / ijustwannacode

08/16/2017 at 06:43PM

25
#16 - Vaughn Cato / vaughncato

07/21/2017 at 01:48PM

25
#17 - huho / huho_xu

07/26/2017 at 08:49PM

25
#18 - Baine Wedlock / BaineWedlock

08/10/2017 at 08:30PM

26
#19 - Jan Bundesmann / ixjab

07/21/2017 at 08:50AM

26
#20 - Gurukandhamoorthi / Gurukandhamoor1

07/21/2017 at 02:33PM

26
#21 - Jorge / jherreso

07/26/2017 at 06:33AM

26
#22 - えるざっぷ / _elzup_

07/31/2017 at 02:25AM

27
#23 - Jonathan Eidsness / jonathaneidsnes

07/25/2017 at 03:00PM

28
#24 - John Nguyen / nguyeness

07/21/2017 at 03:15PM

28
#25 - jl / jl4096

07/21/2017 at 07:14PM

28
#26 - zhangxspace / zhangxspace1

07/25/2017 at 06:28AM

28
#27 - Joonas Pihlajamaa / jokkebk

08/03/2017 at 12:01PM

29
#28 - Brian Hall / _bruab_

07/21/2017 at 03:24PM

29
#29 - Robert Mosher / rcmosher

07/21/2017 at 05:31PM

30
#30 - Michael Foley / m1foley

07/20/2017 at 11:54PM

30
#31 - Cristian Lupașcu / clupasq

07/21/2017 at 06:53AM

30
#32 - Ben Hill / KaizenSoze70

08/15/2017 at 02:24PM

32
#33 - Ricardo M. Vilchis / ajkaanbal

07/21/2017 at 10:31PM

32
#34 - Михаил Доронин / Boris_B_London

07/23/2017 at 10:45AM

33
#35 - Eric Potter / pottereric

07/22/2017 at 07:15PM

33
#36 - Edan Sneh / edan_sneh

07/23/2017 at 09:33PM

35
#37 - Adam Kożuch / adamkozuch

08/16/2017 at 07:13AM

37
#38 - Rahul Gupta / pezcoder

07/26/2017 at 09:16PM

39
#39 - 黒澤亮二 / rjkuro

07/21/2017 at 02:49PM

46
#40 - Clay Thomas / CHThomas95

07/21/2017 at 10:06PM

46
#41 - Juan Colacelli / juancolacelli

07/23/2017 at 11:44AM

61
#42 - Paul Inc / hiniol1982

08/01/2017 at 08:31PM

66
#43 - 杨洋 / 176795444

08/13/2017 at 08:40AM

70
#44 - Vasily Novikov / helensw06796314

08/07/2017 at 05:20PM

137
#45 - Robbin Schepers / Roboroads

07/21/2017 at 11:51AM