php for Emacs

I've been using Eclipse with the PDT plugin for php for a while but I am struggling with the amount of resources it uses (runs the battery down on my laptop faster) and maintenance required to keep Eclipse running smoothly. The other thing that bugs me is the shortcut keys. I find Eclipse slows me down as I reach for the mouse.

Don't get me wrong: Eclipse is a fantastic bit of software with a good debugger and syntax highlighting for Web and Php documents.

This is my next option: http://sourceforge.net/projects/php-mode/

"An Emacs major mode for editing PHP code. Features: Syntax coloring and indenting; Documentation browse and search functions; Support for Imenu and SpeedBar; Customization options"

To install on ubuntu you run (after installing emacs)


sudo apt-get install php-mode

See php-mode the manual:
http://php-mode.sourceforge.net/html-manual/

"PHP mode is a major mode for editing PHP source code in Emacs. As an extension of Emacs's C mode, it inherits all C mode's navigation and editing functionality. Syntax elements of PHP source code is colored according to the grammar of PHP versions 3, 4 and 5. By default, the indent rules follow the PHP PEAR coding guidelines. Additional aids for developing in PHP include documentation search of the PHP manual, code completion and a class browser."

Also:
http://www.emacswiki.org/cgi-bin/wiki/PhpMode

Eclipse has Emacs key bindings but the meta key conflicts.

Any thoughts?


good tutorial

Here's a tutorial:

"The following is intended to provide instructions for setting up an (X)HTML editing environment for Emacs suitable for Web Developers. It uses psgml-mode for SGML/XML editing in conjunction with the DTDs for (X)HTML from the W3C, and uses mmm-mode to define sub-modes for Javascript (using javascript-generic-mode), CSS (using css-mode), and PHP (using php-mode). It also provides support from within Emacs for HTML Tidy."

http://www.dzr-web.com/people/darren/projects/emacs-webdev/

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options