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):
19
#121 - Domingue Justin / @_jdomingue

10/16/2015 at 03:01PM

19
#122 - Bogumił Kamiński / @BogumilKaminski

10/26/2015 at 09:03PM

19
#123 - David Mauskop / @mauskop

11/15/2015 at 04:40PM

19
#124 - Cristian Lupașcu / @clupasq

02/22/2016 at 03:46PM

19
#125 - Dimitar Dimitrov / @kurkale6ka

03/16/2016 at 11:46AM

19
#126 - Will / @obiwan__k3n00bi

10/15/2016 at 06:22PM

19
#127 - Michał Dytko / @DytkoM

12/28/2016 at 10:29AM

19
#128 - Gurukandhamoorthi / @Gurukandhamoor1

07/15/2017 at 04:31PM

19
#129 - Joe Heywood / @joehabsjoe

01/30/2018 at 10:28PM

19
#130 - DHM / @DHM29978992

04/30/2018 at 05:24PM

19
#131 - Lory / @Lory46845742

12/10/2019 at 02:48PM

19
#132 - RockerZZY / @rocker_zzy

06/28/2020 at 02:10AM

19
#133 - mevmev / @mevmev8

10/11/2021 at 10:07PM

19
#134 - Jean George / @JeanGeo20504212

03/27/2022 at 09:25PM

19
#135 - Berel94 / @Berel94

03/17/2024 at 11:20PM

19
#136 - constap / @constap

05/21/2024 at 07:01PM

20
#137 - Daniel Byron / @dansolo17

04/27/2015 at 11:01AM

20
#138 - Kevin Ilphrin Pellet / @Kilphrin

05/03/2015 at 09:14AM

20
#139 - Mauro Persano / @fzort

05/23/2015 at 04:30PM

20
#140 - Andrew Reece / @azmreece

09/11/2015 at 01:48PM

21
#141 - Brian Olpin / @bolpin

04/28/2015 at 09:26PM

21
#142 - shugen / @shugeno

05/04/2015 at 07:59PM

21
#143 - luffy / @raxcoi

05/12/2015 at 03:27PM

21
#144 - Ásgeir Bjarnason / @abjarnasn

07/25/2015 at 03:47PM

22
#145 - [Esc],[Z],[Z] / @dvvrt

07/31/2015 at 06:27AM

22
#146 - Jurica / @Jurica34581259

12/06/2018 at 04:06AM

24
#147 - Yann Moisan / @YannMoisan

04/25/2015 at 01:47PM

24
#148 - Steven Craft / @stevenjohncraft

05/26/2015 at 11:18AM

24
#149 - James / @Dronak

11/30/2022 at 09:33PM

27
#150 - Michael Cordell / @mike_cordell

04/25/2015 at 07:44PM