Closed GoogleCodeExporter closed 8 years ago
I agree, that it would be nice. With javascript-mode I used to do an
indent-region on whole buffers to fix incorrect
indentations, this is no longer possible.
An especially frustrating example is when I use the module pattern, which I
usually format like this:
FooBarBaz = (function () {
return bax;
})();
By default it indents to:
FooBarBazQux = (function () {
return bax;
})();
Even if I remove the indentation from the last line, it still indents the
statements inside all the way in, and even worse, it will
keep indenting this way no matter what the rest of the code looks like, as in
this example (where | is the caret's position
after typing "bam;"):
FooBarBazQux = (function () {
baz;
bam;|
})();
And by the way, js2-mode looks like it could develop into something really
great, keep up the good work!
Original comment by Rae...@gmail.com
on 2 Apr 2008 at 5:23
The particular tab behavior Raevel sees drives me a little batty, too. Not
enough to
go back to javascript-mode, mind you, but it'd be nice if this particular
pattern was
handled differently.
Original comment by mercutio...@gmail.com
on 9 Apr 2008 at 9:34
I agree with turning off the Tab-cycling. I think that pressing TAB should get
you
the default indenting and there should be a secondary indent command to cycle
through
the alternatives. People could bind that to shift-TAB (or whatever). There
could
also be a setting to get back to the present default behavior. I've found the
indenting to work pretty well.
Raevel: if you get rid of the unnecessary parens then it indents fine:
FooBarBaz = function () {
return bax;
}();
Original comment by bob.spam...@gmail.com
on 12 Apr 2008 at 3:16
[deleted comment]
Folks, PLEASE PLEASE PLEASE type M-x customize-group js2-mode.
This behavior is controlled by `js2-bounce-indent-flag'. Set it to nil and TAB
will
no longer cycle the indentation.
Original comment by steve.ye...@gmail.com
on 14 Apr 2008 at 10:16
Original issue reported on code.google.com by
vthun...@gmail.com
on 31 Mar 2008 at 9:28