Emacs with php mode

If you install emacs on a linux distribution to edit php files on the command line and see no syntax colors this tip is for you.

Php syntax color with emacs on the command line


  1. Donwload the file: php-mode.el from sourceforge for example
  2. Copy it into your lisp directory, like site-start or emacs folder in my linux distribution is in the /etc/emacs folder
  3. Edit your .emacs file or site-start.el file and add:

(require 'php-mode)