Re: Emacs and HTML

Tom Hull <[email protected]>
Newsgroups gmane.org.user-groups.aclug.linux-help
Message-ID <[email protected]>
Lars von dem Ast wrote:
> Does anyone use Emacs for HTML markup?

Sure. Why would anyone use anything else?

 > I understand there is a mode
> "html-helper-mode.el" There is also a css.el floating around. Does 
> anyone have any experience with these? Are they still "latest and 
> greatest" way to do HTML/CSS on Linux? If not, what is? Any 
> info/experiences with HTML markup appreciated.

There's an HTML major mode, which gets invoked automatically on .html
files (probably others as well). When working under X it adds a menu
button with a few helper codes, also bound to keystrokes. With this
C-c <RETURN> will insert "<p>\n" for you, which may or may not be a
help. There are similar commands for various other HTML markup; e.g.
C-c C-c h will set up a link, where it asks you for the URL on the
entry line, adds the closing tag, and positions the cursor between
the two tags. Again, as a help that's a tradeoff between having to
learn a code (or pluck something off a menu) and doing a small amount
of extra typing yourself.

The main reason I can't say more about it is that even though I've
edited hundreds of HTML files in emacs, I've never really noticed
the major mode (unlike, e.g., the C major mode, which indents for
you whether you like it or not).

Don't know about CSS -- when I edit a .css file I'm in Fundamental
major mode.

I will say that I think PHP mode is a crock -- basically, it's just
not smart enough to keep track of when you're really doing PHP and
when you're doing HTML, so sometimes you'll find it doing indenting
where it shouldn't, etc.

I fixed this latter problem by commenting out all of the lines in
/usr/share/emacs/site-lisp/site-start.d/php-mode-init.el

> Lb


-- 
/*
  *  Tom Hull * thull2 at cox.net * http://www.tomhull.com/
  */

-- This is the [email protected] list.  To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.