Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

PHP syntax support within HTML syntax #14

Closed
michaelGregoire opened this issue Mar 13, 2014 · 8 comments
Closed

PHP syntax support within HTML syntax #14

michaelGregoire opened this issue Mar 13, 2014 · 8 comments

Comments

@michaelGregoire
Copy link

Most editors have PHP syntax/language support within HTML files, due to the commonality of having PHP within HTML templates. Currently, Atom does not. I hope that this can be rectified. Not having it is a deal breaker for me.

Atom HTML syntax highlighting:
atom-html-syntax

Sublime Text HTML syntax highlighting:
sublime-html-syntax

@probablycorey
Copy link

The langauge-php has support for this, but your files must have one of the php extensions listed.

We don't have plans to add php grammar support to the language-html package because the language-php package already handles html and php parsing. But we have an issue open that would allow you to map .html files to the langauge-php package.

@biacz
Copy link

biacz commented Mar 9, 2015

This is not 100% correct.
I am a totally new Atom user and this is whats happening for me (index.php).
image

Any idea how to fix that? Its really annoying.

@shaqueimcameron
Copy link

How do you fix this?

@50Wliu
Copy link
Contributor

50Wliu commented May 19, 2015

Ctrl+Shift+L (or Cmd+Shift+L) and switch the language to PHP.

@speedy250
Copy link

thanks @50Wliu that solved it for me. Not sure if it will stick though

@arthurbragaa
Copy link

Thanks @50Wliu.

@fabiendeborde
Copy link

Thanks a lot @50Wliu !

@uncleGena
Copy link

uncleGena commented Jan 4, 2017

Ctrl+Shift+L will not save, and you don't want press it on each of 2345 files in your project.
my solution:

  1. download file-types

  2. go to Edit -> Config file

  3. write
    screenshot from 2017-01-04 10 12 37

  4. press Ctrl+S and restart Atom.

screenshot from 2017-01-04 10 11 35

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants