php object operator inside html tag

I can't be the only one who runs into an issue, where I'm trying to echo out some php inside some html - eg a new html attribute, and I reach the end of the html tag, it won't let me put type the php object operator ( -> ) because my cursor is already at the html tag's closing bracket ( > )

eg:

It's not too difficult to fix of course, I can press arrow-key right, write out the rest of my php, then re-close the html tag, it just really interrupts my flow.

Does anyone know if there's an option I can change to avoid this?

Thanks

3 comments
Comment actions Permalink

Unfortunately, this feature is not configurable.
Implementing this would have helped in your situation, so please vote for the issue.

0
Comment actions Permalink

Hi there,

Have you considered using some Live Template that will insert full correct PHP block at once. E.g.

<div[CARET]></div>

after live template expansion:

<div<?= [CARET] ?>></div>

Since the PHP block is properly closed, you can then write any PHP code there.

0
Comment actions Permalink

That's a good shout Andriy, thanks. I have done that. And voted for the autocomplete idea!

0

Please sign in to leave a comment.