HTML Auto-indent Does Not Work If Original File Type is PHP
See original GitHub issue- VSCode Version: Version: 1.28.2 (user setup) Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850 Date: 2018-10-17T00:23:51.859Z Electron: 2.0.9 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: x64
- OS Version: Windows 7
Steps to Reproduce:
- Create new PHP file
- Type in div.class, hit tab, hit enter
Current Solution:
Change file type to HTML, and then back to PHP
Proposed solution:
In a file type where HTML tab-completion works, HTML auto-indenting should also work
Does this issue occur when all extensions are disabled?: Quick Google search did not provide clear instructions on how to perform this in Windows.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:5
Top Results From Across the Web
autoindent don't work in php file - Stack Overflow
When I edit php file,the autoindent setting just don't work.It works in js css and any other files.Only in php file,I need to...
Read more >Vim: How to indent html code correctly in php file? - Super User
My workaround for this is to temporarily switch to html mode, mark region and indent, and then go back to php mode. :set...
Read more >Auto indent turns off itself automatically on php files
It might be better to use autocmd FileType * setlocal autoindent instead. It is true that that will not be triggered if the...
Read more >indent.txt - Vim
Note that 'cindent' indenting does not work for every code scenario. ... will reindent the line only if the key is the first...
Read more >Auto-indent from HTML/PHP on OSX not working
This behaviour happens in both PHP and HTML files/syntaxes. Interestingly enough, indentation works just perfectly if I manually set the syntax ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is definitely a bug, the fact that it’s been around for so long is a little concerning. I’ve been quite about this for a while. But it’s really starting to annoy me. It’s a shame because VSCode is amazing code editor otherwise.
#103147 reported this a while ago and got a rather unsatisfying response… I have yet to find a solution.