News for hackers. Stuff that matters.
Re:New Version of jsbin.com by rodly on Monday July 23, 2012 @12:16AM (#4279512)
I recall using jsbin a month or so ago and had it fail on some basic JS I had inputted to test it out. Anecdotal and without proof but that is what made me decide on using jsfiddle. Going to give jsbin another try with this new version.

*edit:

This frustrates me so much on jsfiddle and I'm guessing it's a default browser formatting thing but why don't you guys make the curly braces NOT leap forward from where my cursor is?

Example : http://i.imgur.com/mZXTO.png

Re:New Version of jsbin.com by yoklov on Monday July 23, 2012 @01:41AM (#4279717)
WRT formatting, a lot of JS coders think you should always begin your curly braces on the same line as the statement, not on the next, or you risk the wrath of automatic semicolon insertion. The formatter seems fine if you do it this way, and it's also a generally good idea to avoid bizarre, hard to track down bugs.

But I'd understand if that's not an acceptable answer for you.

Re:New Version of jsbin.com by masklinn on Monday July 23, 2012 @06:08AM (#4280295)
> not on the next, or you risk the wrath of automatic semicolon insertion.

That's to e.g. return an object though.

On the other hand, allman with anonymous functions? That's completely bonkers-looking.

Re:New Version of jsbin.com by remysharp on Monday July 23, 2012 @04:35AM (#4280107)
It's a setting in CodeMirror which jsbin and jsfiddle both make use of.

However, if you open the devtools console in your browser, and run: `jsbin.settings.editor.smartIndent = false` it'll disable the indenting. The setting is sticky, so you it should remain whilst the data is stored against the browser.

Re:New Version of jsbin.com by jqueryin on Monday July 23, 2012 @07:34AM (#4280455)
To that note, is there a page listing out all of these settings overrides? I'm thinking we could each have our own versions of .vimrc for JSBIN :-P
Re:New Version of jsbin.com by remysharp on Monday July 23, 2012 @11:32AM (#4281440)
Not yet, but there will be. For the moment, anything you can set in CodeMirror's config ( http://codemirror.net/doc/manual.html#config ) you can set via `jsbin.settings.editor.[key] = [value]` and it'll apply it to the JS Bin editors.

There's a couple of others, and docs will be coming soon. In addition, there's an exposed API that allows you to point JS Bin to a JSON file and it'll load in and save those settings - which is useful for starting a class for teaching where you want the editor in the same mode across all the students.