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
#31 - Pierpaolo Frasa / @Tainnor

05/03/2015 at 04:03AM

18
#32 - Oleg Alfalfa / @6alfalfa9

05/03/2015 at 09:30AM

18
#33 - Mickael Le Gal / @mickaellegal

05/03/2015 at 06:36PM

18
#34 - i5513 / @i5513

05/03/2015 at 08:49PM

18
#35 - diziet.sma / @diziet__sma

05/04/2015 at 11:23PM

18
#36 - Wade / @vvandy

05/06/2015 at 08:25PM

18
#37 - たんたる / @tantal_mech

05/07/2015 at 02:21AM

18
#38 - vim_ninja / @vim_ninja

05/08/2015 at 02:40AM

18
#39 - Felix / @DoubleFelix_

05/10/2015 at 02:41AM

18
#40 - DrHobo / @_DrHobo_

05/10/2015 at 10:14PM

18
#41 - Chris / @crr0004

05/12/2015 at 01:53PM

18
#42 - Spy / @thatspysaspy

05/12/2015 at 10:26PM

18
#43 - danweaver / @danweaver

05/13/2015 at 05:39PM

18
#44 - Douglas Pollock / @desudation

05/15/2015 at 10:43PM

18
#45 - Peter Burt / @peterburt

05/17/2015 at 09:56PM

18
#46 - Clark DuVall / @theclarkatron

05/20/2015 at 05:03PM

18
#47 - David Stensland / @DavidStensland

05/20/2015 at 05:48PM

18
#48 - mat / @matgeist

05/21/2015 at 05:00PM

18
#49 - Stephen Drodge / @sjdrodge

05/21/2015 at 06:55PM

18
#50 - Marcelo Montu / @_mMontu_

05/26/2015 at 11:25AM

18
#51 - Adetque / @Adetque

05/29/2015 at 09:13AM

18
#52 - Sir Chauffeur / @sebdul

06/02/2015 at 04:47PM

18
#53 - Max Br / @maxbr91

06/04/2015 at 11:21AM

18
#54 - Lifepillar / @lifepillar

06/15/2015 at 08:43PM

18
#55 - Dan Piponi / @sigfpe

07/21/2015 at 07:48PM

18
#56 - Ferdev vimgolf / @fergvimgolf

08/11/2015 at 09:59PM

18
#57 - Liam Thurston / @lthurston188

08/17/2015 at 04:31AM

18
#58 - Blake Tereau / @BlakeTereau

08/22/2015 at 10:44PM

18
#59 - Jörg Meyer / @JoergMy

08/24/2015 at 06:36PM

18
#60 - T A / @SirAviles

08/31/2015 at 10:50AM