Reputation: 1159
I am using Adobe Brackets 1.0 code editor.
I have .php
pages that include HTML
& PHP
lines.
HTML
lines indenting fine BUT PHP
lines do not indent correctly!
is there any extension or way to force PHP
lines to indent correctly?
I've used and tried the following extensions but non of them did the job:
Thanks
P.S. I can't believe such good editor lack this important feature & functionality out-of-the-box.
UPDATE after Nicolò's answer:
Upvotes: 9
Views: 7121
Reputation: 1159
I found a workaround to indent php
codes
all what I had to do is to wrap the php
code inside {}
Example
<body>
<div>
<div>
<!-- some html contents -->
<?php
{
//your php code here;
//next lines will be indented correctly;
}
?>
<div>
<div>
<?php
{
//php code here;
//another php line;
}
?>
</div>
</div>
</div>
</div>
</body>
I found this way works fine with me and not causing any issues to the codes or to the pages.
Hope this helps
Upvotes: 1
Reputation: 1875
Try to install the "Indentator" extension and press Ctrl+Alt+i
UPDATE After SULTAN's update:
There is an issue on GitHub about this problem: https://github.com/adobe/brackets/issues/10038
Upvotes: 3