* editing html - auto insert end tags
@ 2005-08-17 22:55 chris
2005-08-17 23:03 ` Lennart Borgman
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: chris @ 2005-08-17 22:55 UTC (permalink / raw)
Hi,
Does anyone know of a html mode that will auto insert the end tags as I
type. If <html> is typed, it'll add </html> straight away?
It's a simple thing I can live without, but it would be nice.
Cheers,
Chris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: editing html - auto insert end tags
2005-08-17 22:55 editing html - auto insert end tags chris
@ 2005-08-17 23:03 ` Lennart Borgman
2005-08-17 23:30 ` Gian Uberto Lauri
[not found] ` <mailman.4112.1124321986.20277.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2005-08-17 23:03 UTC (permalink / raw)
Cc: help-gnu-emacs
chris wrote:
> Hi,
>
> Does anyone know of a html mode that will auto insert the end tags as
> I type. If <html> is typed, it'll add </html> straight away?
>
> It's a simple thing I can live without, but it would be nice.
You can use nxml-mode to edit xhtml files, see EmacsWiki.
nxml-mode does not do exactly what you are asking for. Instead it keeps
track of what is missing so just position the point where the end tag
should be and the type C-c C-f. And since it is an error that the end
tag is missing nxml-mode can take you to the right position too. It will
also show be a red underline where that is.
Very handy.
^ permalink raw reply [flat|nested] 8+ messages in thread
* editing html - auto insert end tags
2005-08-17 22:55 editing html - auto insert end tags chris
2005-08-17 23:03 ` Lennart Borgman
@ 2005-08-17 23:30 ` Gian Uberto Lauri
[not found] ` <mailman.4112.1124321986.20277.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 8+ messages in thread
From: Gian Uberto Lauri @ 2005-08-17 23:30 UTC (permalink / raw)
Cc: help-gnu-emacs
>>>>> "c" == chris <spamoff.danx@ntlworld.com> writes:
c> Hi, Does anyone know of a html mode that will auto insert the end
c> tags as I type. If <html> is typed, it'll add </html> straight
c> away?
html-helper-mode does something like this for some tags...
--
/\ ___
/___/\__|_|\_|__|___Gian Uberto Lauri_____________________
//--\ | | \| | Integralista GNUslamico
\/ e coltivatore diretto di software
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.4112.1124321986.20277.help-gnu-emacs@gnu.org>]
* Re: editing html - auto insert end tags
[not found] ` <mailman.4112.1124321986.20277.help-gnu-emacs@gnu.org>
@ 2005-08-18 0:02 ` chris
2005-08-18 11:02 ` Friedrich Laher
0 siblings, 1 reply; 8+ messages in thread
From: chris @ 2005-08-18 0:02 UTC (permalink / raw)
Gian Uberto Lauri wrote:
>>>>>> "c" == chris <spamoff.danx@ntlworld.com> writes:
>
> c> Hi, Does anyone know of a html mode that will auto insert the end
> c> tags as I type. If <html> is typed, it'll add </html> straight
> c> away?
>
> html-helper-mode does something like this for some tags...
Do you have to turn it on manually? I have html-helper-mode here but it
doesn't do it. I had a look for a more recent version, but there are
loads of pages out there hosting it all with varying versions.
Thanks,
Chris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: editing html - auto insert end tags
2005-08-18 0:02 ` chris
@ 2005-08-18 11:02 ` Friedrich Laher
0 siblings, 0 replies; 8+ messages in thread
From: Friedrich Laher @ 2005-08-18 11:02 UTC (permalink / raw)
just some idea
(setq htmlTagWriting nil)
(defun htmlOpeningTag () (interactive)
(insert "<>") (setq htmlStartTagMarkEnd (point-marker))
(backward-char 1) (setq htmlStartTagMarkBeg (point-marker))
(setq htmlTagWriting t)
)
(defun htmlClosingTag () (interactive)
(when htmlTagWriting
(goto-char htmlStartTagMarkEnd)
(insert "</" (buffer-substring htmlStartTagMarkBeg
htmlStartTagMarkEnd) )
(goto-char htmlStartTagMarkEnd)
(setq htmlTagWriting nil)
)
)
(local-set-key "<" 'htmlOpeningTag)
(local-set-key [tab] 'htmlClosingTag)
chris wrote:
> Gian Uberto Lauri wrote:
>
>>>>>>> "c" == chris <spamoff.danx@ntlworld.com> writes:
>>>>>>
>>
>> c> Hi, Does anyone know of a html mode that will auto insert the end
>> c> tags as I type. If <html> is typed, it'll add </html> straight
>> c> away?
>>
>> html-helper-mode does something like this for some tags...
>
>
> Do you have to turn it on manually? I have html-helper-mode here but
> it doesn't do it. I had a look for a more recent version, but there
> are loads of pages out there hosting it all with varying versions.
>
>
> Thanks,
> Chris
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: editing html - auto insert end tags
@ 2005-08-17 23:16 Dave Humphries
0 siblings, 0 replies; 8+ messages in thread
From: Dave Humphries @ 2005-08-17 23:16 UTC (permalink / raw)
I don't know of any auto-insert-end-tags function for any mode, however
nxml-mode (for editing xhtml) does have a key sequence C-cf for
entering closing tags and I would be surprised if the standard or
psgml-mode didn't have something similar.
Tried www.emacswiki.org ?
Dave
-----Original Message-----
From: help-gnu-emacs-bounces+dave.humphries=dytech.com.au@gnu.org
[mailto:help-gnu-emacs-bounces+dave.humphries=dytech.com.au@gnu.org] On
Behalf Of chris
Sent: Thursday, 18 August 2005 8:55 AM
To: help-gnu-emacs@gnu.org
Subject: editing html - auto insert end tags
Hi,
Does anyone know of a html mode that will auto insert the end tags as I
type. If <html> is typed, it'll add </html> straight away?
It's a simple thing I can live without, but it would be nice.
Cheers,
Chris
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.4110.1124321756.20277.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2005-08-20 9:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-17 22:55 editing html - auto insert end tags chris
2005-08-17 23:03 ` Lennart Borgman
2005-08-17 23:30 ` Gian Uberto Lauri
[not found] ` <mailman.4112.1124321986.20277.help-gnu-emacs@gnu.org>
2005-08-18 0:02 ` chris
2005-08-18 11:02 ` Friedrich Laher
-- strict thread matches above, loose matches on Subject: below --
2005-08-17 23:16 Dave Humphries
[not found] <mailman.4110.1124321756.20277.help-gnu-emacs@gnu.org>
2005-08-19 21:47 ` chris
2005-08-20 9:33 ` David Hansen
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).