[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to edit "mixed" (e.g. HTML/JavaScript) files?
From: |
Hadron |
Subject: |
Re: How to edit "mixed" (e.g. HTML/JavaScript) files? |
Date: |
Thu, 08 Mar 2007 12:02:34 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Hadron <hadronquark@gmail.com> writes:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>
>> kj wrote:
>>> It often happens that a single file must contain code corresponding
>>> to two different syntaxes. For example, an HTML file with embedded
>>> JavaScript or CSS.
>>>
>>> Is there a way to *locally* override the mode of a file and replace
>>> it with a different mode?
>>>
>>> If not, is there a good way to deal with such situations (other
>>> than avoiding them altogether)?
>>>
>>> Thanks!
>>>
>>> kj
>>
>> It depends on whom you ask ;-)
>>
>> You may try nxhtml-part-mode in nXhtml (you need Emacs 22 beta):
>>
>> http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
>>
>> Or you may try this
>>
>> http://www.emacswiki.org/cgi-bin/wiki/MultipleModes
>>
>>
>
> Has anyone recently got this multiplemodes working? The wiki reads like
> a slaughter house!
ok, I bit the bullet.
I followed the instructions here:
http://www.emacswiki.org/cgi-bin/wiki/HtmlModeDeluxe
having installed php-mode, downloaded stefans css-mode, mmm-mode and pqsml from
synaptic in Ubuntu.
I created a "my-mmm.el" pasting in the code listed there to configure
the html editing.
It all worked well "enough".
The default hiliting is attrocious IMO and I had to change
mmm-default-submode-face to grey12. The mode changes when I am in
embedded php.
Interestingly though css-mode is the major mode for css files, not mmm
mode. Any ideas why?
--
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, (continued)
- Message not available
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, Hadron, 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, David Hansen, 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, Lennart Borgman (gmail), 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, David Hansen, 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, Lennart Borgman (gmail), 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, David Hansen, 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, Lennart Borgman (gmail), 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, David Hansen, 2007/03/08
- Message not available
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?, Hadron, 2007/03/08
- Re: How to edit "mixed" (e.g. HTML/JavaScript) files?,
Hadron <=