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

143 active golfers, 298 entries

Leaderboard (lowest score wins):
19
#121 - Dimitar Dimitrov / @kurkale6ka

03/16/2016 at 11:46AM

19
#122 - Will / @obiwan__k3n00bi

10/15/2016 at 06:22PM

19
#123 - Michał Dytko / @DytkoM

12/28/2016 at 10:29AM

19
#124 - Gurukandhamoorthi / @Gurukandhamoor1

07/15/2017 at 04:31PM

19
#125 - Joe Heywood / @joehabsjoe

01/30/2018 at 10:28PM

19
#126 - DHM / @DHM29978992

04/30/2018 at 05:24PM

19
#127 - Lory / @Lory46845742

12/10/2019 at 02:48PM

19
#128 - RockerZZY / @rocker_zzy

06/28/2020 at 02:10AM

20
#129 - Daniel Byron / @dansolo17

04/27/2015 at 11:01AM

20
#130 - Kevin Ilphrin Pellet / @Kilphrin

05/03/2015 at 09:14AM

20
#131 - Mauro Persano / @fzort

05/23/2015 at 04:30PM

20
#132 - Andrew Reece / @azmreece

09/11/2015 at 01:48PM

21
#133 - Brian Olpin / @bolpin

04/28/2015 at 09:26PM

21
#134 - shugen / @shugeno

05/04/2015 at 07:59PM

21
#135 - luffy / @raxcoi

05/12/2015 at 03:27PM

21
#136 - Ásgeir Bjarnason / @abjarnasn

07/25/2015 at 03:47PM

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

07/31/2015 at 06:27AM

22
#138 - Jurica / @Jurica34581259

12/06/2018 at 04:06AM

24
#139 - Yann Moisan / @YannMoisan

04/25/2015 at 01:47PM

24
#140 - Steven Craft / @stevenjohncraft

05/26/2015 at 11:18AM

27
#141 - Michael Cordell / @mike_cordell

04/25/2015 at 07:44PM

28
#142 - Ivan Kasatenko / @sky31338

05/09/2015 at 04:26PM

53
#143 - Personal Life Trackr / @PersLifeTrackr

05/24/2015 at 09:25PM