phpstorm (2.1) javascript auto intend problem
writing a code block with auto indent. no manual tabbing...
$(document).ready(function() {
$("#welc").toggle(function() {
$(this).val("hello");
}, function() {
$(this).val('hell');
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#welc").toggle(function() {
$(this).val("hello");
}, function() {
$(this).val('hell');
});
});
</script>
a bug or i am missing something?
Please sign in to leave a comment.
I think it's related to http://youtrack.jetbrains.net/issue/IDEA-70166, no need to report it separately. Bug fix update 2.1.1 may contain a fix.
the red curly brackets are not automatically closed. so i need to close it by myself. this bug applies for all inside functions. this is a jQuery code. please check for this also. thank you.
$('#document').ready(function() {
$('#patric').animate(
{height: "50px", width: "250px" }, //two tabs instead of one and not automatically closed brackets are annoying..
{duration:"slow"} //two tabs instead of one. //two tabs instead of one and not automatically closed brackets are annoying..
);
})
for the code above. phpstorm puts an extra tab (the object literal settings are tabbed two times :( and for the object literal settings the curly brackets are not automatically closed also.
really annoying me so i went back to my old IDE until the next Phpstorm fix.
@kas Autoclosing brackets is a separate issue. I'd very much appreciate if you could submit a bug to http://youtrack.jetbrains.net. It's the best place to report any problems you find. Thank you!
I have created also a separate issue for your original report, see http://youtrack.jetbrains.net/issue/WI-6540.
It seems to be a differnt problem from what I assumed before. You can add yourself to whatchers to get notifications on issue comments and a fix. You are also welcome to leave your own comments there if you have any.
Can you also open an issue for non-auto cloding brackets? I could do that by myself but your reports looks much more well explained.