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 by @Iury_Adones:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @YannMoisan

148 active golfers, 312 entries

Solutions by @Iury_Adones:
18
#73 - Iury Adones / @Iury_Adones

05/08/2018 at 04:26PM

18
#>73 - Iury Adones / @Iury_Adones

05/08/2018 at 04:34PM

18
#>73 - Iury Adones / @Iury_Adones

05/08/2018 at 04:52PM

19
#>127 - Iury Adones / @Iury_Adones

05/08/2018 at 04:20PM

19
#>127 - Iury Adones / @Iury_Adones

05/08/2018 at 04:23PM

20
#>136 - Iury Adones / @Iury_Adones

05/08/2018 at 04:31PM

21
#>140 - Iury Adones / @Iury_Adones

05/08/2018 at 04:22PM

22
#>141 - Iury Adones / @Iury_Adones

05/08/2018 at 04:20PM