help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Better syntax highlighting


From: Pascal J. Bourguignon
Subject: Re: Better syntax highlighting
Date: Wed, 08 Dec 2010 15:19:58 -0000
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux)

Giuseppe Fuggiano <giuseppe.fuggiano@gmail.com> writes:

> Hi there,
>
> I'm learning Emacs for programming tasks and I think it's very powerful.
>
> But, the first thing I saw migrating from Vim is that Emacs handles
> syntax highlighting differently, often messing up if a given source
> contains multiple languages (like a PHP file).  I tried a plugin named
> nxhtml, but it seems heavy and makes Emacs' startup quite slow.  I
> don't want to start an editor war here, just point out that Emacs
> seems so powerful, but doesn't have a smart syntax highlighting
> available out of the box.
>
> I'm sure there's a solution to this. That's why I'm posting.

Use mmm-mode.

When it cannot determine it automatically,  you may add tags to
specify the language: 
   {%php-mode%}
    ... 
   {%/php-mode%}


Put: <!-- -*- mode:html;mode: mmm; coding:utf-8 -*- -->
on the first or second line of the file.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]