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):
76
#91 - Jonas Grillères / @jonasgrilleres

03/06/2022 at 09:06AM

77
#92 - Joe Previte 🦀 / @jsjoeio

09/05/2019 at 03:45PM

87
#93 - Jurica / @Jurica34581259

11/16/2018 at 05:44PM

101
#94 - Mick Soda / @MidgarMassacre

09/29/2017 at 06:00AM

110
#95 - Kitsan / @Strustle

11/26/2020 at 04:07PM

137
#96 - Robbin Schepers / @Roboroads

07/21/2017 at 11:51AM