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
#91 - ushumpei / @ushumpei_

04/26/2015 at 01:16PM

19
#92 - Kevin Yokley / @kyokley19

04/26/2015 at 11:54PM

19
#93 - mnx / @mnxx

04/27/2015 at 09:41AM

19
#94 - kungfuchad / @kungfuchad

04/27/2015 at 11:07AM

19
#95 - Matt / @mcr05

04/27/2015 at 02:21PM

19
#96 - ipson_nek / @ipson_nek

04/27/2015 at 04:23PM

19
#97 - Aludirk Wong / @Aludirk

04/28/2015 at 02:56PM

19
#98 - Hendrik Lammers / @hendriklammers

04/28/2015 at 08:37PM

19
#99 - AC / @quadface

04/29/2015 at 10:42PM

19
#100 - Jonny - Male 2.0.37 / @Jonnytron

05/01/2015 at 05:42PM

19
#101 - Zach Morgan / @zpmorgan

05/01/2015 at 10:16PM

19
#102 - ZC-死理性派 / @zecyzhang

05/02/2015 at 01:14PM

19
#103 - Alan Rafael / @alanrrb

05/03/2015 at 04:18AM

19
#104 - Marcin Szamotulski / @me_coot

05/04/2015 at 11:07AM

19
#105 - Slurpie Chapdash / @SlurpieChapdash

05/06/2015 at 07:32PM

19
#106 - Tom van der Lee / @TomVdLee

05/08/2015 at 06:47AM

19
#107 - Marcio Junior / @marciojunior_me

05/10/2015 at 06:47PM

19
#108 - Strabs / @artistavenue

05/11/2015 at 02:39PM

19
#109 - Elizabeth / @sprinkles418

05/11/2015 at 05:40PM

19
#110 - Rickard Fransson / @xxRion

05/11/2015 at 09:30PM

19
#111 - Vivek Sunder / @sviveksunder

05/13/2015 at 02:06PM

19
#112 - Ammar Najjar / @ammarnajjar

05/25/2015 at 06:21PM

19
#113 - Hao Deng / @haodeng

06/12/2015 at 04:28AM

19
#114 - Grisha Pushkov / @readoonly

06/16/2015 at 10:28AM

19
#115 - Mutter Mumble / @muttermumble

06/18/2015 at 07:43PM

19
#116 - raghu erapaneedi / @raghue9

06/19/2015 at 01:44PM

19
#117 - Jack Z / @itszhou

06/28/2015 at 04:07PM

19
#118 - Teemu Okkonen / @TeemuOkkonen

07/08/2015 at 09:17PM

19
#119 - Endre Galaczi / @galacziendre

08/07/2015 at 01:17PM

19
#120 - Walker Boh / @walker_boh

10/05/2015 at 02:15PM