Loading ...
Sorry, an error occurred while loading the content.

Re: [jasspa] HTML tag matching

Expand Messages
  • first last
    HTML does not require you to close the tags, but it is recommended (and required in XHTML). What many editors do is closing the closest tag as soon as you type
    Message 1 of 6 , Jul 27, 2004
    • 0 Attachment
      HTML does not require you to close the tags, but it is recommended (and
      required in XHTML).

      What many editors do is closing the closest tag as soon as you type </,
      no keypress required, can it get any easier than that?

      --- Thomas Hundt <thundt@...> wrote:
      ---------------------------------
      [Gabriel]
      > For a while I have been looking for an editor that would hightlight
      > unmatched html tags (to no avail).
      > Would it be possible to:
      > 1. Show unmatched tags in a different colour (error colour?). So if
      you
      > have <td> and no </td> it would display the <td> in a different
      colour?

      I think in XML you are *required* to match (close) tags strictly; in
      HTML you can get away with leaving a lot of them out (e.g., </td>
      before
      a </tr>). So this sort of thing would be useful for XML mode.

      A nifty extra added feature would be a command that closed the most
      recent open tag. E.g., after a <td> you hit the key and it types the
      </td> for you. Wouldn't that be fun ;-)

      -Th



      __________________________________________________________________________

      This is an unmoderated list. JASSPA is not responsible for the content
      of
      any material posted to this list.

      To unsubscribe, send a mail message to

      mailto:jasspa-unsubscribe@yahoogroups.com

      or visit http://groups.yahoo.com/group/jasspa and
      modify your account settings manually.





      Yahoo! Groups Sponsor ADVERTISEMENT


      ---------------------------------
      Yahoo! Groups Links

      To visit your group on the web, go to:
      http://groups.yahoo.com/group/jasspa/

      To unsubscribe from this group, send an email to:
      jasspa-unsubscribe@yahoogroups.com

      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






      ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
    • Phillips, Steven
      Gabriel, I have found that reformatting the html/asp/js file using ME s indentation is the best way of quickly finding a missing important tag, as a result I
      Message 2 of 6 , Jul 28, 2004
      • 0 Attachment
        Gabriel,

        I have found that reformatting the html/asp/js file using ME's indentation is the best way of quickly finding a missing important tag, as a result I have added <span> and others to the list of indented tags.

        ME does not current support the hilighting of specific sections of text in a buffer, it relies on either temporary screen-pokes which would mean that the missing tags would have to be all visible, or by using a hilight which would probably involve inserting start and end tokens into the buffer - not good.

        A 'find-next-unmatched-tag' command could easily be written (probably utilizing the existing html-goto-matching-tag command) and I also like the '</' idea... may add this if I get the time.

        Steve

        > -----Original Message-----
        > From: first last [mailto:prelude_2_murder@...]
        > Sent: 27 July 2004 20:16
        > To: jasspa@yahoogroups.com
        > Subject: Re: [jasspa] HTML tag matching
        >
        >
        > HTML does not require you to close the tags, but it is
        > recommended (and
        > required in XHTML).
        >
        > What many editors do is closing the closest tag as soon as
        > you type </,
        > no keypress required, can it get any easier than that?
        >
        > --- Thomas Hundt <thundt@...> wrote:
        > ---------------------------------
        > [Gabriel]
        > > For a while I have been looking for an editor that would hightlight
        > > unmatched html tags (to no avail).
        > > Would it be possible to:
        > > 1. Show unmatched tags in a different colour (error colour?). So if
        > you
        > > have <td> and no </td> it would display the <td> in a different
        > colour?
        >
        > I think in XML you are *required* to match (close) tags strictly; in
        > HTML you can get away with leaving a lot of them out (e.g., </td>
        > before
        > a </tr>). So this sort of thing would be useful for XML mode.
        >
        > A nifty extra added feature would be a command that closed the most
        > recent open tag. E.g., after a <td> you hit the key and it types the
        > </td> for you. Wouldn't that be fun ;-)
        >
        > -Th
        >
        >
        >
        > ______________________________________________________________
        > ____________
        >
        > This is an unmoderated list. JASSPA is not responsible for the content
        > of
        > any material posted to this list.
        >
        > To unsubscribe, send a mail message to
        >
        > mailto:jasspa-unsubscribe@yahoogroups.com
        >
        > or visit http://groups.yahoo.com/group/jasspa and
        > modify your account settings manually.
        >
        >
        >
        >
        >
        > Yahoo! Groups Sponsor ADVERTISEMENT
        >
        >
        > ---------------------------------
        > Yahoo! Groups Links
        >
        > To visit your group on the web, go to:
        > http://groups.yahoo.com/group/jasspa/
        >
        > To unsubscribe from this group, send an email to:
        > jasspa-unsubscribe@yahoogroups.com
        >
        > Your use of Yahoo! Groups is subject to the Yahoo! Terms
        > of Service.
        >
        >
        >
        >
        >
        >
        > ___________________________________________________________ALL
        > -NEW Yahoo! Messenger - all new features - even more fun!
        http://uk.messenger.yahoo.com



        __________________________________________________________________________

        This is an unmoderated list. JASSPA is not responsible for the content of
        any material posted to this list.

        To unsubscribe, send a mail message to

        mailto:jasspa-unsubscribe@yahoogroups.com

        or visit http://groups.yahoo.com/group/jasspa and
        modify your account settings manually.



        Yahoo! Groups Links
      • Phillips, Steven
        Following macro does what its name suggests, hope you find it useful. Steve define-macro html-find-next-unmatched-tag !if ¬ &seq @wc
        Message 3 of 6 , Jul 28, 2004
        • 0 Attachment
          Following macro does what its name suggests, hope you find it useful.

          Steve

          define-macro html-find-next-unmatched-tag
          !if ¬ &seq @wc "<"
          !force html-backward-tag
          !if ¬ &seq @wc "<"
          html-forward-tag
          !endif
          !endif
          !repeat
          set-variable #l0 $window-line
          set-variable #l1 $window-col
          html-goto-matching-tag
          !if &and &equ #l0 $window-line &equ #l1 $window-col
          ml-write "[No matching tag found]"
          !abort
          !endif
          set-variable $window-line #l0
          set-variable $window-col #l1
          !force html-forward-tag
          !if ¬ &seq @wc "<"
          !force html-forward-tag
          !endif
          !until ¬ &seq @wc "<"
          end-of-buffer
          ml-write "[No unmatched tag found]"
          !emacro

          > -----Original Message-----
          > From: Phillips, Steven
          > Sent: 28 July 2004 14:24
          > To: jasspa@yahoogroups.com
          > Subject: RE: [jasspa] HTML tag matching
          >
          >
          > Gabriel,
          >
          > I have found that reformatting the html/asp/js file using
          > ME's indentation is the best way of quickly finding a missing
          > important tag, as a result I have added <span> and others to
          > the list of indented tags.
          >
          > ME does not current support the hilighting of specific
          > sections of text in a buffer, it relies on either temporary
          > screen-pokes which would mean that the missing tags would
          > have to be all visible, or by using a hilight which would
          > probably involve inserting start and end tokens into the
          > buffer - not good.
          >
          > A 'find-next-unmatched-tag' command could easily be written
          > (probably utilizing the existing html-goto-matching-tag
          > command) and I also like the '</' idea... may add this if I
          > get the time.
          >
          > Steve
          >
          > > -----Original Message-----
          > > From: first last [mailto:prelude_2_murder@...]
          > > Sent: 27 July 2004 20:16
          > > To: jasspa@yahoogroups.com
          > > Subject: Re: [jasspa] HTML tag matching
          > >
          > >
          > > HTML does not require you to close the tags, but it is
          > > recommended (and
          > > required in XHTML).
          > >
          > > What many editors do is closing the closest tag as soon as
          > > you type </,
          > > no keypress required, can it get any easier than that?
          > >
          > > --- Thomas Hundt <thundt@...> wrote:
          > > ---------------------------------
          > > [Gabriel]
          > > > For a while I have been looking for an editor that would
          > hightlight
          > > > unmatched html tags (to no avail).
          > > > Would it be possible to:
          > > > 1. Show unmatched tags in a different colour (error
          > colour?). So if
          > > you
          > > > have <td> and no </td> it would display the <td> in a different
          > > colour?
          > >
          > > I think in XML you are *required* to match (close) tags
          > strictly; in
          > > HTML you can get away with leaving a lot of them out (e.g., </td>
          > > before
          > > a </tr>). So this sort of thing would be useful for XML mode.
          > >
          > > A nifty extra added feature would be a command that closed the most
          > > recent open tag. E.g., after a <td> you hit the key and it
          > types the
          > > </td> for you. Wouldn't that be fun ;-)
          > >
          > > -Th
          > >
          > >
          > >
          > > ______________________________________________________________
          > > ____________
          > >
          > > This is an unmoderated list. JASSPA is not responsible for
          > the content
          > > of
          > > any material posted to this list.
          > >
          > > To unsubscribe, send a mail message to
          > >
          > > mailto:jasspa-unsubscribe@yahoogroups.com
          > >
          > > or visit http://groups.yahoo.com/group/jasspa and
          > > modify your account settings manually.
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Sponsor ADVERTISEMENT
          > >
          > >
          > > ---------------------------------
          > > Yahoo! Groups Links
          > >
          > > To visit your group on the web, go to:
          > > http://groups.yahoo.com/group/jasspa/
          > >
          > > To unsubscribe from this group, send an email to:
          > > jasspa-unsubscribe@yahoogroups.com
          > >
          > > Your use of Yahoo! Groups is subject to the Yahoo! Terms
          > > of Service.
          > >
          > >
          > >
          > >
          > >
          > >
          > > ___________________________________________________________ALL
          > > -NEW Yahoo! Messenger - all new features - even more fun!
          > http://uk.messenger.yahoo.com
          >
          >
          >
          > ______________________________________________________________
          > ____________
          >
          > This is an unmoderated list. JASSPA is not responsible for
          > the content of
          > any material posted to this list.
          >
          > To unsubscribe, send a mail message to
          >
          > mailto:jasspa-unsubscribe@yahoogroups.com
          >
          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          > --------------------~-->
          > Yahoo! Domains - Claim yours for only $14.70
          > http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/89EolB/TM
          > --------------------------------------------------------------
          > ------~->
          >
          > ______________________________________________________________
          > ____________
          >
          > This is an unmoderated list. JASSPA is not responsible for
          > the content of
          > any material posted to this list.
          >
          > To unsubscribe, send a mail message to
          >
          > mailto:jasspa-unsubscribe@yahoogroups.com
          >
          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
        • first last
          Thank you very much for the macro. It really does the job. Could you please include on the next release? Regarding the other solution (restyle buffer) the
          Message 4 of 6 , Jul 28, 2004
          • 0 Attachment
            Thank you very much for the macro. It really does the job. Could you
            please include on the next release?

            Regarding the other solution (restyle buffer) the problem is that php
            pages do not always indent properly.

            An example of html that does not indent right:
            <span><? overLib::popup('<img src="img/info.gif"
            align="absmiddle" border="0">',
            "Family: Constitutes two adults (under 61 years)
            travelling with unlimited dependent children plus two non-family
            children (single trip only) under 18 years at departure date. Dependent
            students in full time education under 25 years can be included as
            children (go FREE) on annual multi-trip travel insurance. Children and
            students cannot travel independently on family insurance. <br /> <br />
            Single Parent Family: When only one parent (under 61 years) travels
            with unlimited dependent children, under 18 years at departure date. No
            non-family children and Students allowed. Children cannot travel
            independently on family insurance.",
            "CAPTION, 'Family Policy', WIDTH, 460, OFFSETX,
            10, OFFSETY, -100") ?>

            The above code resets the indentation to 0 (don't ask me why, I am
            sorry but I don't know enough about me macros to find out).

            Apart from that thanks very much. The macro will help me a lot.

            Gabriel





            ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
          Your message has been successfully submitted and would be delivered to recipients shortly.