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

96 active golfers, 324 entries

Leaderboard (lowest score wins):
24
#31 - Jon Krause / @jkrause314

12/16/2020 at 03:48AM

24
#32 - Jung Yeon Park / @park_jungy

02/16/2021 at 11:50PM

24
#33 - hepebexè / @hepebexe

03/05/2021 at 10:01AM

24
#34 - A A A / @37fatos

03/13/2021 at 02:44AM

24
#35 - Jean George / @JeanGeo20504212

01/16/2022 at 10:27PM

24
#36 - Janzen / @__Coos

10/04/2022 at 03:43AM

24
#37 - Peppa Pig / @PeppaPigSg

07/02/2024 at 08:51AM

24
#38 - nickGPT / @nickandbro

08/27/2024 at 05:31AM

25
#39 - Vaughn Cato / @vaughncato

07/21/2017 at 01:48PM

25
#40 - huho / @huho_xu

07/26/2017 at 08:49PM

25
#41 - Baine Wedlock / @BaineWedlock

08/10/2017 at 08:30PM

25
#42 - Francois Marais / @maraisf

04/03/2018 at 04:47PM

25
#43 - DHM / @DHM29978992

04/25/2018 at 04:06AM

25
#44 - Mihai / @mihaicristiant

12/28/2018 at 03:56PM

25
#45 - Ivo Blöchliger / @aigledesalpes

08/23/2019 at 11:49AM

25
#46 - Lory / @Lory46845742

11/26/2019 at 02:08PM

25
#47 - chocolate / @chocola81394123

10/28/2020 at 09:07AM

25
#48 - Luoyb / @Luoyb

11/15/2023 at 07:40AM

26
#49 - Jan Bundesmann / @janbundesmann

07/21/2017 at 08:50AM

26
#50 - Gurukandhamoorthi / @Gurukandhamoor1

07/21/2017 at 02:33PM

26
#51 - Jorge / @jherreso

07/26/2017 at 06:33AM

26
#52 - えるざっぷ / @_elzup_

07/31/2017 at 02:25AM

26
#53 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 12:41PM

27
#54 - Jonathan Eidsness / @jonathaneidsnes

07/25/2017 at 03:00PM

27
#55 - Ben Hill / @KaizenSoze70

10/11/2017 at 11:46AM

28
#56 - John Nguyen / @nguyeness

07/21/2017 at 03:15PM

28
#57 - jl / @jl4096

07/21/2017 at 07:14PM

28
#58 - zhangxspace / @zhangxspace1

07/25/2017 at 06:28AM

28
#59 - Joonas Pihlajamaa / @jokkebk

08/03/2017 at 12:01PM

29
#60 - Brian Hall / @_bruab_

07/21/2017 at 03:24PM