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 553b97364ba96c319d0296eb

readability

Make the code readable by adding some spaces

Start file
J=J-y(i)*log(h)-(1-y(i))*log(1-h)+(lambda/2)*sumtheta2;
End file
J = J - y(i) * log(h) - (1 - y(i)) * log(1 - h) + (lambda / 2) * sumtheta2;

View Diff

diff --git a/vimgolf2-in b/vimgolf2-out
index
3babd97..ddbb1af 100644
--- a/vimgolf2-in
+++ b/vimgolf2-out
@@ -1 +1 @@
-J=J-y(i)*log(h)-(1-y(i))*log(1-h)+(lambda/2)*sumtheta2;
+J = J - y(i) * log(h) - (1 - y(i)) * log(1 - h) + (lambda / 2) * sumtheta2;

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 151 remaining solutions by signing in and submitting your own entry
#152 Personal Life Trackr / @PersLifeTrackr - Score: 53 - 05/24/15 @ 21:25
a <Esc>w.w.w.f).w.f).w.f1.w.5l.w.5l.w.2l.w.fafa.w.2l.w.ZZ

0 comments


Created by: @YannMoisan

152 active golfers, 327 entries

Leaderboard (lowest score wins):
18
#61 - Mikael Saltzman / @MikaelSaltzman

09/27/2015 at 11:20AM

18
#62 - Mike Adams / @davis_cromwell

10/02/2015 at 04:52PM

18
#63 - Jon Krause / @jkrause314

10/17/2015 at 02:34AM

18
#64 - Árpád Krejczinger / @krarpi

11/11/2015 at 02:15PM

18
#65 - Aleksey Zhidkov / @AlexeyZhidkov

02/24/2016 at 11:23AM

18
#66 - T. Sakuma / @taku39

05/05/2016 at 02:48PM

18
#67 - Jordan Wightman / @tuo2

08/13/2016 at 12:37PM

18
#68 - Daniel / @Daniel00288663

03/31/2017 at 07:17AM

18
#69 - Daniel Capo Sobral / @dcsobral

05/26/2017 at 11:18PM

18
#70 - Ben Hill / @KaizenSoze70

09/26/2017 at 01:18PM

18
#71 - Turkey Man / @lvturkeyman

11/25/2017 at 04:42AM

18
#72 - BarbaJol / @drpproteus

01/09/2018 at 05:21PM

18
#73 - Iury Adones / @Iury_Adones

05/08/2018 at 04:26PM

18
#74 - Daniël De Koker / @daniel_koker

07/17/2018 at 08:07AM

18
#75 - Mihai / @mihaicristiant

02/11/2019 at 04:14PM

18
#76 - Miłosz Łakomy / @foobar01123

03/01/2020 at 03:56PM

18
#77 - jonas brothers lover / @grossiau

10/14/2020 at 10:24PM

18
#78 - Jake Grossman / @PiranaLaugh

11/13/2020 at 07:53AM

18
#79 - Janzen / @__Coos

09/29/2022 at 12:32PM

18
#80 - Peppa Pig / @PeppaPigSg

06/29/2024 at 06:05AM

18
#81 - nickGPT / @nickandbro

08/28/2024 at 04:12AM

18
#82 - Qingz / @Noct943

10/10/2024 at 08:25AM

19
#83 - we’re going to need a bigger bot / @assaflavie

04/25/2015 at 04:00PM

19
#84 - vgmct / @vgmct

04/25/2015 at 05:18PM

19
#85 - Michael Cramer / @mlcramer

04/25/2015 at 07:14PM

19
#86 - Jerome Korlowski / @nolifish

04/25/2015 at 07:29PM

19
#87 - E Both / @enboth

04/25/2015 at 08:38PM

19
#88 - chvzvhn / @chvzvhn

04/25/2015 at 10:20PM

19
#89 - Gammelin Guillaume / @ggammelin

04/26/2015 at 08:23AM

19
#90 - Chase Vasic / @ChaseVasic

04/26/2015 at 10:07AM