Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
php + html + javascript + css mixed editing via mutli-mode (multiple major modes). indenting, coloring, normal modes syntax parsing, etc.
Emacs Lisp PHP
branch: master

updated css-mode-hook to *not* auto-indent on ";" char. if user has "…

…nxhtml-mumamo-mode" setup, use that instead of "php-htm-mode"
latest commit d3bb29e8b1
Tracey Jaquith authored

README.md

php-htm-mode

php + html + javascript + css mixed editing via mutli-mode (multiple major modes).

Has indenting, coloring, normal modes syntax parsing, etc.

Has some auto-newline and indent features for JS/CSS/PHP

Assumes and works best with emacs v24+ but will try to "gracefully degrade" for earlier versions.

As a special bonus, for randomness, will do similar multi-mode for bash and shell scripts that have inline php.

Example usage setup:

  • cd $HOME;
  • git clone git://github.com/traceypooh/php-htm-mode.git;

  • Add these lines to your $HOME/.emacs:
    (load-library (concat (getenv "HOME") "/php-htm-mode/multi-mode.el"))
    (load-library (concat (getenv "HOME") "/php-htm-mode/php-htm-mode.el"))

Works great on linux and MacOSX (I'm using macports and "sudo port install emacs php-mode.el" for v24 emacs in Mountain Lion)

Demo video: ScreenShot

Here's some screenshots illustrating cursor movement and mode changes in a file with 4 kinds of code (PHP/HTM/CSS/JS)

ScreenShot ScreenShot ScreenShot ScreenShot

Something went wrong with that request. Please try again.