unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Alternative for html-mode (sgml-mode based) for editing HTML/JSP/Django/Jinja/PHP.
@ 2013-01-13 15:23 Oleksandr Gavenko
  0 siblings, 0 replies; only message in thread
From: Oleksandr Gavenko @ 2013-01-13 15:23 UTC (permalink / raw)
  To: help-gnu-emacs

What mode useful for editing HTML files?

I use gsml based mode, but it outdated (in flavour of HTML 5) and don't show
docs for tags/attributes.

But I also create hacks for JSP file type (to get commenting working):

  (define-derived-mode jsp-mode html-mode "JSP"
    "JSP editing mode. Redefine HTML comment syntax to JSP."
    (setq comment-start "<%--")
    (setq comment-end "--%>")
    (setq comment-start-skip "<[!%]--[ \t]*")
    (setq comment-end-skip "[ \t]*--[% \t\n]*>")
    (setq jsp-font-lock-syntactic-keywords
          '(("\\(<\\)%--" (1 "< b"))
            ("--%\\(>\\)" (1 "> b"))))
    (setcdr (assoc 'font-lock-syntactic-keywords font-lock-defaults) 'jsp-font-lock-syntactic-keywords) )

  (add-to-list 'auto-mode-alist '("\\.jspf?\\'" . jsp-mode))

Look like ugly hack...

I miss indentation of code in <script type="text/javascript"> and <style
type="text/css"> tags and code highlighting.

I miss proper code commenting in JSP/Django/PHP files...

Any suggestion?

-- 
Best regards!




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-13 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-13 15:23 Alternative for html-mode (sgml-mode based) for editing HTML/JSP/Django/Jinja/PHP Oleksandr Gavenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).