Option to indent PHP code based on the HTML around it #10038
Comments
Anyone ? |
That is how it works. The indentation level doesn't depend on the indentation of You can add the preference |
Well that's a little stupid, it should indent properly like everything else... |
Notice that the html is inside the php code, not the other way around. So is not that stupid how it works. It just doesn't work as you want it to work, and might not even be an issue to other developers. I don't mix php and html (is not a good practice) and when I need to I mostly need just 1 line. So this doesn't affect me. If you are also creating a function that outputs html. You might want the php code to align, and not have it aligning itself inside the html blocks. Anyway. Brackets uses CodeMirror to render the editor, and this is an issue with how the smart indentation works in php in CodeMirror, so it will need to be fixed here. You can submit an issue there if you want. |
Is there are CodeMirror issue we are tracking here? Or someone needs to create it? |
@TomMalbran I am not aware of a CM issue on this. I did a quick search but did not find one. |
Hi all, |
I have the same problem! Any news? |
+1 |
Just submitted the CodeMirror tracking issue codemirror/codemirror5#3488 |
This will work as described beginning in Release 1.5. |
php code writing error. |
I have 1.5... and it don't work. This should be fixed! But that's a bad way to have to do this. |
@mikael1000 Brackets align the code at the same level of |
Hello. I have a problem with the PHP code not indenting properly. What happens is every time I type "<?php" all the code after this line does not indent. I tried removing all the plugins , same thing. Here is an example:
The text was updated successfully, but these errors were encountered: