If I have :setf html
everything works as expected in the below example (the indentation matches up).
say however, i have the following code (note the indent before the code), except i have it on :setf php
.
the | is the cursor
<div class="sig">|</div>
If I hit enter, it does this
<div class="sig">
|</div>
Because 99% of the time im editing php there is html in the template file, i find it kind of annoying to switch.
I feel like there must be a way for vim to read markers and perhaps have multiple filetypes in one document (just like if setf=html
it could maybe read the style tags or an inline style tag and 'know' that that little snippet in the "" is a css filetype
Does this help?
:setfiletype html.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With