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

Remove semicolons after expressions

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

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 160 remaining solutions by signing in and submitting your own entry
#161 Stefan Schmidt / stafue - Score: 8 - 12/06/13 @ 15:26
:%s/;<CR>ZZ

0 comments


#162 Quota / Quotad - Score: 8 - 02/10/14 @ 15:50
:%s/;<CR>ZZ

0 comments


#163 jimauthors / jimauthors - Score: 8 - 03/04/14 @ 00:48
:%s/;<CR>ZZ

0 comments


#164 Mark Inksa / MInksaCS - Score: 8 - 05/11/14 @ 12:32
:%s/;<CR>ZZ

0 comments


#165 Ram Tamtam / ramtamtamtam - Score: 8 - 06/30/14 @ 14:36
:%s/;<CR>ZZ

0 comments


#166 Tj / yrddy - Score: 8 - 08/19/14 @ 11:37
:%s/;<CR>ZZ

0 comments


#167 mark0829 / mark0829 - Score: 8 - 03/19/15 @ 05:27
:%s/;<CR>ZZ

0 comments


#168 pftb12345 / pftb12345 - Score: 8 - 04/13/15 @ 05:47
:%s/;<CR>ZZ

0 comments


#169 Adrien Fabre / statox42 - Score: 8 - 05/24/15 @ 18:50
:%s/;<CR>ZZ

0 comments


#170 Skúli Jóhannsson / skulibj - Score: 8 - 06/28/15 @ 21:11
:%s/;<CR>ZZ

0 comments


#171 Anno / AnnoVinyl - Score: 8 - 10/15/15 @ 16:08
:%s/;<CR>ZZ

0 comments


#172 Yann / yannstadnicki - Score: 8 - 03/01/17 @ 01:21
:%s/;<CR>ZZ

0 comments


#173 Peter Sand / PeterSand12 - Score: 8 - 03/11/17 @ 18:22
:%s/;<CR>ZZ

0 comments


#174 Brian Hall / _bruab_ - Score: 8 - 10/02/17 @ 15:08
:%s/;<CR>ZZ

0 comments


#175 Ben Hill / KaizenSoze70 - Score: 8 - 10/12/17 @ 18:37
:%s/;<CR>ZZ

0 comments


#176 DHM / DHM29978992 - Score: 8 - 05/01/18 @ 03:13
:%s/;<CR>ZZ

0 comments


#177 autological_being / metaporias - Score: 8 - 05/03/18 @ 19:00
:%s/;<CR>ZZ

0 comments


#178 Gatlee / gatmek - Score: 8 - 05/06/18 @ 14:15
:%s/;<CR>ZZ

0 comments


#179 Alec Chen / alec929 - Score: 9 - 11/03/12 @ 14:12
:%s/;/<CR>ZZ

0 comments


#180 RobertT / techrt2050 - Score: 9 - 07/10/13 @ 08:59
:%s/.$<CR>ZZ

0 comments


#181 Hachez Floran / FloranHachez - Score: 9 - 09/06/13 @ 23:14
<CR>:%s/;<CR>ZZ

0 comments


#182 luffy / raxcoi - Score: 9 - 06/12/15 @ 15:36
:%s/;/<CR>ZZ

0 comments


#183 James Cash / jamesnvc - Score: 10 - 06/02/12 @ 16:52
:%s/;//<CR>ZZ

0 comments


#184 Drew Benedetti / cnorsl - Score: 10 - 07/17/12 @ 19:28
:%s/;//<CR>ZZ

0 comments


#185 Christopher Brew / Seph1rothVII - Score: 10 - 07/24/12 @ 21:16
:%s/;//<CR>ZZ

0 comments


#186 it's not me / dpree - Score: 10 - 08/10/12 @ 15:47
:g/;/s/<CR>ZZ

0 comments


#187 Tyler Breisacher / tbreisacher - Score: 10 - 08/25/12 @ 07:42
:%s/;//<CR>ZZ

0 comments


#188 Alex Hammel / AlexJHammel - Score: 10 - 12/23/12 @ 18:22
:%s/;//<CR>ZZ

0 comments


#189 Asmund / herrasbe - Score: 10 - 01/12/13 @ 17:34
:%s/;//<CR>ZZ

0 comments


#190 Marcelo Izaguirre / shinigamichelo - Score: 10 - 05/30/14 @ 11:10
:,$s/;$<CR>ZZ

0 comments


#191 Paul Draghicescu / pdragy - Score: 10 - 03/22/18 @ 22:10
:%s/;//<CR>ZZ

0 comments


#192 Raphaël De Giusti / raphdg - Score: 11 - 06/02/12 @ 18:42
$*xnxnxnxZZ

0 comments


#193 olopost / olopost - Score: 11 - 08/19/14 @ 20:18
:%s/;//g<CR>ZZ

0 comments


#194 lauri lehmijoki / laurilehmijoki - Score: 12 - 06/02/12 @ 14:58
qa$xjjq3@aZZ

laurilehmijoki: There is a drawback to this solution: it forces me to take into account the amount of semicolons I want to remove.

wondible: There's always the recursive macro qa...@aq@a Though it might get a little crazy if the register isn't empty beforehand.

2 comments


#195 NuM / NuM314 - Score: 12 - 10/05/13 @ 23:43
4@='$xjj'<CR>ZZ

0 comments


#196 Tomasz Wesołowski / KosGD - Score: 12 - 10/13/14 @ 11:40
qq$x2jq3@qZZ

0 comments


#197 Gurukandhamoorthi / Gurukandhamoor1 - Score: 12 - 07/27/17 @ 14:55
qq/;<CR>xq3@qZZ

0 comments


#198 Rohin Patel / ropatel - Score: 14 - 11/02/12 @ 00:49
:%s/;//g<CR>:wq!<CR>

0 comments


#199 Noel Alejandro / noelrock333 - Score: 15 - 06/23/12 @ 00:03
:%s/;//<CR>:w<CR><Esc>:q<CR>

0 comments


#200 Samuel Masuy / samasuy - Score: 15 - 07/24/14 @ 16:06
qaI<Esc>A<BS><Esc>jjq3@aZZ

0 comments


Created by: laurilehmijoki

200 active golfers, 423 entries

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

06/02/2012 at 04:39PM

6
#2 - Tim Chase / gumnos

06/02/2012 at 04:48PM

6
#3 - Alain Gilbert / alain_gilbert

06/02/2012 at 05:16PM

6
#4 - Sebastian Kusnier / skusnier

06/02/2012 at 06:25PM

6
#5 - Federico Galassi / federicogalassi

06/02/2012 at 08:44PM

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

06/03/2012 at 01:48AM

6
#7 - akhilravidas / akhilravidas

06/03/2012 at 10:25AM

6
#8 - Rod Knowlton / codelahoma

06/03/2012 at 06:11PM

6
#9 - Sergey / sav86

06/04/2012 at 12:19AM

6
#10 - Benson Kim / BensonRLA

06/05/2012 at 03:29PM

6
#11 - Benoit Mortgat / Benoit_Mortgat

06/05/2012 at 06:50PM

6
#12 - Paul Gessler / pdgessler

06/07/2012 at 04:38AM

6
#13 - Kerson Hsiao / KersonHsiao

06/07/2012 at 10:52AM

6
#14 - Dave / zzdave13

06/07/2012 at 08:41PM

6
#15 - utopiah / utopiah

06/08/2012 at 01:04PM

6
#16 - Drew Hannay / drewhannay

06/09/2012 at 07:07AM

6
#17 - Joakim L. Engeset / joakim_eng

06/11/2012 at 05:35PM

6
#18 - Rolf Bjaanes / rolfb

06/15/2012 at 02:08PM

6
#19 - noom narze / NarzE

06/18/2012 at 06:16AM

6
#20 - Ryan O'Connell / Salshammath

06/21/2012 at 12:58AM

6
#21 - Greg Sabo / gregsabo

06/21/2012 at 04:25AM

6
#22 - Ilya Ermolin / ermolinis

06/21/2012 at 03:41PM

6
#23 - mwatkward / AftrschoolSpe

06/22/2012 at 12:01PM

6
#24 - abernardes / abernardes

06/22/2012 at 03:40PM

6
#25 - Ryan Kois / r_kois

06/23/2012 at 06:11PM

6
#26 - Raúl Jara / rauljara

07/06/2012 at 08:56PM

6
#27 - Sebastian Korten / FlashKorten

07/15/2012 at 03:32PM

6
#28 - wes / _weslly

07/16/2012 at 04:20PM

6
#29 - Oliver Mader / dotb52

07/17/2012 at 07:10AM

6
#30 - Ben Alpert / soprano

07/17/2012 at 09:07AM