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 4fc9d767d3a0d4000100000e

Append semicolon after expressions

Some lines need the semicolon, some don't.

Start file
var foo

var bar = myCoolStuff()

callRemote()

foo = callTheWorld()
End file
var foo;

var bar = myCoolStuff();

callRemote();

foo = callTheWorld();

View Diff

1c1
< var foo
---
> var foo;
3c3
< var bar = myCoolStuff()
---
> var bar = myCoolStuff();
5c5
< callRemote()
---
> callRemote();
7c7
< foo = callTheWorld()
---
> foo = callTheWorld();

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 384 remaining solutions by signing in and submitting your own entry
#385 Noel Alejandro / @noelrock333 - Score: 38 - 06/23/12 @ 00:08
:4<BS>%s.<BS>/s<BS>)/x<BS>no<BS><BS>/<BS>(<BS>);/<CR>1G7la;<Esc>:w<CR><C-W>q

0 comments


Created by: @laurilehmijoki

385 active golfers, 942 entries

Leaderboard (lowest score wins):
13
#331 - José / @AngelGaldamez

09/12/2019 at 02:30AM

13
#332 - tpoeiras / @tpoeirass

08/01/2021 at 04:14AM

13
#333 - x03n046 / @x03n046

05/16/2022 at 02:49AM

14
#334 - celery rho gamma / @rentalcustard

06/02/2012 at 09:35AM

14
#335 - Jakub Troszok / @zosoooo

06/02/2012 at 10:05AM

14
#336 - Matty Williams / @matty_jwilliams

06/08/2012 at 12:17PM

14
#337 - Tadas Sce / @tadassce

06/10/2012 at 08:41PM

14
#338 - Carlos Hernando / @chernando

06/13/2012 at 07:03PM

14
#339 - Florian Motlik / @leanvienna

06/14/2012 at 12:47PM

14
#340 - J Paul Daigle / @philosodad

06/19/2012 at 01:17PM

14
#341 - Mike Kenyon / @mike_kenyon

07/16/2012 at 05:10PM

14
#342 - Lukas Korsika / @LKorsika

07/17/2012 at 05:12AM

14
#343 - Kim Le / @kimledev1

07/31/2012 at 10:40PM

14
#344 - Javier Cervantes / @solojavier

09/04/2012 at 06:43PM

14
#345 - Adam Dratwinski / @adwinsky

11/27/2012 at 07:33PM

14
#346 - Dominick LoBraico / @pygatea

12/11/2012 at 11:20PM

14
#347 - Daniel Hahler / @blueyed

01/22/2013 at 08:14PM

14
#348 - Derek Salerno / @DerekSalerno

05/26/2013 at 10:24PM

14
#349 - Dave Aitken / @actionshrimp

08/27/2013 at 06:26PM

14
#350 - Raphaël Saunier / @RaphaelSaunier

08/27/2013 at 06:34PM

14
#351 - CJ Avilla / @wizemanip

05/12/2014 at 06:58PM

14
#352 - Patrick Pitoscia / @Patrick03960431

08/06/2014 at 02:35AM

14
#353 - ltn614 / @ltn614

09/21/2015 at 06:08AM

14
#354 - Gurukandhamoorthi / @Gurukandhamoor1

07/13/2017 at 12:05PM

14
#355 - Jurica / @Jurica34581259

11/19/2018 at 08:39PM

14
#356 - POSIX / @po6ix

01/24/2022 at 02:14PM

15
#357 - Mario Forner / @m_forner

06/19/2012 at 07:13AM

15
#358 - Kevin McGladdery / @run_kmc

08/11/2012 at 11:58PM

15
#359 - Tyler Breisacher / @tbreisacher

08/25/2012 at 07:54AM

15
#360 - wilddog64 / @chengkai318

12/17/2013 at 08:32PM