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

420 active golfers, 1057 entries

Leaderboard (lowest score wins):
11
#121 - vimgolfer / @vimgolfer7

10/12/2019 at 04:43PM

11
#122 - Melvin Cheung / @MelvinCheung

11/13/2019 at 03:20AM

11
#123 - Miłosz Łakomy / @foobar01123

12/25/2019 at 04:46AM

11
#124 - hereforthepermission / @herefortheperm1

01/20/2020 at 03:19PM

11
#125 - Ryan Nevius / @ryannevius

03/29/2020 at 07:04PM

11
#126 - RockerZZY / @rocker_zzy

06/20/2020 at 11:48PM

11
#127 - m397 / @m39752809546

05/12/2021 at 06:38PM

11
#128 - ._. / @Katharsic

05/18/2021 at 07:15AM

11
#129 - Arya Kumar / @SusSquirrel

05/26/2021 at 02:29AM

11
#130 - Scott Atkins / @scottrick49

07/15/2021 at 12:37PM

11
#131 - russellzhaomao / @russellzhaomao

06/05/2022 at 12:42PM

11
#132 - Alex / @AlexanderHeatl2

07/09/2022 at 04:45PM

11
#133 - anakojm / @anakojm

07/13/2022 at 11:26PM

11
#134 - AbhilashSreenivasa / @AbhilashSreeni7

09/26/2022 at 12:19AM

11
#135 - Janzen / @__Coos

09/26/2022 at 10:48AM

11
#136 - James Marshall / @astrophd

10/21/2022 at 03:05AM

11
#137 - Dionysus / @user101user

06/15/2023 at 10:24PM

11
#138 - مرجان / @IEnfantTerribIe

08/03/2023 at 04:18PM

11
#139 - ilyas / @Ahaaah2071

09/28/2023 at 02:28AM

11
#140 - asirago / @asiragoo

12/13/2023 at 10:44PM

11
#141 - xiaoao1024 / @xiaoao1024

05/06/2024 at 11:13AM

11
#142 - Peppa Pig / @PeppaPigSg

05/25/2024 at 09:06AM

11
#143 - Paul McDowell / @etothepi16

06/16/2024 at 08:04PM

11
#144 - Petro Mudrievskyj / @petemud

07/01/2024 at 11:53AM

11
#145 - nickGPT / @nickandbro

08/28/2024 at 08:54PM

11
#146 - Suhaib Murshid / @suhaibm

09/13/2024 at 04:56AM

12
#147 - Tibor Claassen / @codebeige

06/02/2012 at 09:21AM

12
#148 - h_east (トロッコ6個) / @h_east

06/02/2012 at 09:29AM

12
#149 - Pawel Obrok / @mrYapee

06/02/2012 at 10:23AM

12
#150 - Simon Nicolussi / @sinic

06/02/2012 at 02:18PM