8

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

Tallboy
  • 12,847
  • 13
  • 82
  • 173

1 Answers1

2

Does this help?

:setfiletype html.php
Greg Sexton
  • 9,189
  • 7
  • 31
  • 37