views:

330

answers:

3

What are the best plugins for emacs if you want to use it for web development?

+6  A: 

As noted in the comments nXhtml is an addon to Emacs for editing XHTML, PHP and similar things. It is not very well-known, but it looks like at least Drew Yates has found it useful:

nXML mode and the subsequent nXHTML mode for emacs are godsends ...

And that was before the developer fixed all the bugs ... ;-)

Most of this is stolen from the project's site, but I most certainly think that nxhtml-mode contains everything essential for web development in it. There are also stuff like the legacy html-mode. css-mode, php-mode(the last two are part of nxhtml-mode). I'm not sure about espresso-mode(which currently is the best javascript mode around). There are also cperl-mode for perl development, ruby-mode - you name it, we've got it.

Bozhidar Batsov
+3  A: 

Steve Yegge's js2-mode.

Ken
+1  A: 

Not specifically for web development but don't forget Yasnippet (or another template / skeleton / snippet system).

I wouldn't be able to stay sane when working on XSLT (still somewhat related to webdev nowadays?) without it. Typing xcho<TAB> inserts:

<xsl:choose>
  <xsl:when test="$1">
    $0
  </xsl:when>
  <xsl:otherwise>
    $2
  </xsl:otherwise>
</xsl:choose>

with the cursor initially standing at $1 (the $* parts aren't displayed), then after pressing <TAB> again at $2 and finally at $0.

I don't have any specific HTML examples but the snippets are easy to make.

aerique