Open GoogleCodeExporter opened 8 years ago
Hi there,
Quite the same here, but it will only occur when I've an hashmap passed as a
parameter to an function/constructor.
I believe the bug starts manifest itself when you type :
1.
new Class({
})
Now inserting a semi-colon where suggested by the parser will produce
2.
new Class({
});
After fixing that by pressing tab, I'll start typing inside the hashmap and tab
again
before the property name :
3.
new Class({
'first'
});
Now I soon I type the colon an additional indentation is added :
4.
new Class({
'first':
});
I assume this level of indentation is good enough (I personally like it), but
when
I'll assign the return value of this instance to a variable, another level of
indentation is added (just after typing the colon character again) :
4.
new Class({
'first': function() {
//Code here
}
});
5.
var class = new Class({
'first': function() {
//Code here
}
});
6.
var class = new Class({
'first': function() {
//Code here
},
'second'
});
7.
var class = new Class({
'first': function() {
//Code here
},
'second':
});
Best regards
Samori
Original comment by SamoriGo...@gmail.com
on 28 Jun 2008 at 9:02
For me this crops up passing anonymous functions as parameters. Type (! being
point):
foo(function() !
Now hit {. You get:
foo(function() {
!
}
This is an acceptable indentation decision, but I'd prefer a different style.
So I TAB:
foo(function() {
!
}
Now enter a statement. Any character that induces electric indentation, e.g. (
or ;,
will indent the line back to where it was before I TABbed.
-David
Original comment by dmho...@gmail.com
on 15 Jul 2008 at 3:32
Original issue reported on code.google.com by
rib...@gmail.com
on 20 Jun 2008 at 4:01