Menu

html tag highlighting - just like brackets...

jive
2007-04-27
2012-11-14
1 2 > >> (Page 1 of 2)
  • jive

    jive - 2007-04-27

    I've posted this a thousand times, with no answer at all from the devs. I find the bracket hi-lighting feature
    fantastic. It has made my life 10 times easier. I'm asking for this to be done only with html tags. For example, in complicated nests, it would be nice to be able to click on the opening html tag and have the closing html tag that it pertains to highlight.

    Don & Jens, is this feature possible? Or in no way to be considered. Begging for this feature!

    -Jive

     
    • Nobody/Anonymous

      Wow... it works ... cool. Now I need to have a reason to use it. Sheeez... I wish I was a code writer sometimes, you guys have it so easy these days.

       
    • Nobody/Anonymous

      This really would be useful.... is this really that hard to create?

       
    • Nobody/Anonymous

      This great feature released in jEdit with some xml plugins. Its very useful!

       
    • jive

      jive - 2007-05-24

      Yeah, But nobody seems very interested in developing it...which sux. I've been begging for this for months. This would really speed up my work flow, with all of the nesting that goes on in code. Searching for the end tag sometimes is a pain...

      Maybe it's just a hopeless dream. :(

       
    • Nobody/Anonymous

      I will think about it.

      Best Regards
      Jens

       
    • jive

      jive - 2007-05-25

      :) I luv u :)

       
    • jive

      jive - 2007-05-31

      Jens would this be really hard to implement?

       
    • jive

      jive - 2007-06-18

      Guess there is no hope for this...

       
      • Don HO

        Don HO - 2007-06-18

        It needs a lot of coding effort.
        Maybe someone is interested in doing it. Then his/her contribution is very welcome.

        Don

         
    • Nobody/Anonymous

      So much to do at the moment, sorry.

      Best Regards
      Jens

       
    • jive

      jive - 2007-06-20

      hmm, more so then bracket hi-lighting? I actually have never seen a code editor that allows this. But I wish it could be done... unfortunately I am a web programmer and not a desktop application developer... or I would do this in a heart beat...

       
    • Nobody/Anonymous

      so I guess this is completely out of the question?

       
    • Nobody/Anonymous

      Don,

      Does this mean that you won't even consider it? I have found this feature very useful using eclipse, with the aptana plugin. It's a fantastic feature... You have already done it with functions... why not html tags?

       
      • CodeNexus

        CodeNexus - 2007-07-18

        What I think Jens and Don both hinted at is that yes it would be a nice feature but they are too busy with the myriad of other features they need to maintain/implement.

        If someone wants to help them out go for it (the source code is available!).  I can't because I'm useless at programming at that level and don't understand the language.  A feature I have myself tried to hack at was proper regex support plugin in find/replace (if one doesn't already exist) and I got completely lost on where to even begin.

        If enough people want a feature perhaps as a group effort we should trying to work this one out and feed it back into the community?  The reliance on one or two lead developers to do all the work is dangerous anyway.  What happens if they get sick or something???

        The only other suggestion would be for one or more people to pay them an obscene amount of money to focus on it.  If the feature is that important and would save you time therefore think of the money it may save you.

        OK that is enough of my rant.

        PS  Thanks Dev team for the awesome program you create.  It rocks and you rock for all the hard work you put in!   :-D

         
        • Martijn Coppoolse

          Totally agree, Nexus!  The developers have enough to do already, and remember that Np++ is freeware.  I don't know how they earn their living, but I think any development for Notepad++ is done on top of a regular job.

          In fact, that's one of the beauties of Np++'s plug-in structure: the main developers *don't* have to worry about implementing everything, since people can write their own plug-ins.  If you want something really badly, just write a plug-in that does it, or get someone else to do it for you.

          In fact, I started writing a plug-in for just this purpose -- highlighting of the matching HTML tag -- last weekend, but didn't finish it (I couldn't get the Scintilla SCI_FIND message to return the proper result. Anyone else have trouble with searching backwards?).

          BTW, CodeNexus: what (programming) language(s) do you know?

          Another rant of mine: I've seen people in this thread saying "it's possible already with brackets, so it should be easy to implement for HTML tags".  The answer to that is: no, it's *not* that simple.
          For one, the bracket highlighting is already implemented by the Scintilla editor component, so Notepad++ only has to turn it on or off.
          Second, a bracket is one fixed opening character, with one fixed corresponding closing character.  That's very easy to find.  An HTML tag, OTOH, is a *variable* opening character string, with a corresponding variable closing character string!  A few examples of tag that could match </a>:
          - <a name=''>
          - <
          A    href="#">
          - <A href='#' id="test" name="test" onclick="quit()">
          These should ALL be recognized... 

          And then you have to take into account that some tags can be nested, so you have to keep track of all matching tags being opened and closed until you've found the one matching your starting tag.

          It takes time to code all that properly!

           
          • Don HO

            Don HO - 2007-08-09

            I confirm what he said Martijn, and I make a point of congratulating him for what he did.
            It'll be included in the future Notepad++ release if it is stable.

            Don

             
    • jive

      jive - 2007-07-18

      You know, I do understand that N++ is free and open source, and being a coder (of a different language), I understand the time it takes as well. Appreciate the devs? You bet! They have done an excellent job!  Does that mean I will discontinue to make feature requests for features that I think will be a strong addition to notepad++? Nope, gonna still keep beggin'! ;) . I begged for close buttons on the tabs, and am glad that I did. It makes all the difference in the world.

      In the end, they don't have to implement any feature requests. It is their prerogative. But it sure would make already great editor even greater!

      Martijn - Thank you for your efforts so far!  Keep us posted as thing progress, (or don't)

       
      • Martijn Coppoolse

        Well, I've got a beta version that seems to be working.

        I've no time left to figure out how to upload it to the Npp-plugins project; for now, just download the DLL from http://tinus.coppoolse.googlepages.com/HTMLTag.rar

        Installation as usual:
        Extract the DLL to the folder under %ProgramFiles%\Notepad++ (or wherever you're running Notepad++ from) or %AppData%\Notepad++, and (re)start Np++.

        Usage is fairly straightforward:
        Ctrl+T to select the matching tag, Shift+Ctrl+T to select both tags, and the entire contents in between.  Both options are available under the Plugins menu item 'HTML Tag'; the shortcut keys can be adjusted with the shortcut mapper.

        Let me know how you fare.

        (Do note that this is still a beta version, and could very well crash Np++, so make sure you've saved everything before using it!)

         
    • Nobody/Anonymous

      I actually would really like this feature... this would be a strong plugin...

       
    • Nobody/Anonymous

      Looks like somebody is working on it. This guy Martijn seems to be doing something with it. But not sure if he's been successful at it...

       
    • Nobody/Anonymous

      Will this work in PHP?

      Currently, when the code just like:
      -----------------------------------
      <table id="<?=$name?>">
      <tr>
      <td>Words</td>
      </tr>
      </table>
      -----------------------------------
      When I press Ctrl+T in table start tag, the focus will go to table end tag, but when I press Ctrl+T at table end tag, it will not go to the start tag. But if I remove the php code in table start tag, it works just fine.

       
      • Martijn Coppoolse

        Hm... When searching backwards, it gets confused because there's no more ">" end-of-tag before the PHP code's "<?" opening tag; that's why it doesn't recognize the "<table" start.

        I might have some time to look at it tomorrow; if I do, I'll try to fix it then.  Otherwise, it'll be sometime next week.

         
    • jive

      jive - 2007-08-08

      Wow. Impressive. Thank you! Thank you! Thank you! You've just made my coding life 10 times easier! love the other feature where it will highlight the block as well. Is there any way to configure it so that it will just happen when you click on the tag instead of clicking cntrl+T ? I mean you click on the opening tag and it maintains its hilite with both the opening and closing?

      You're awsome Matinjn!

       
      • Martijn Coppoolse

        You're welcome, Jive!  :-)

        I suppose you mean that you'd like it to behave like the bracket highlighting; i.e. have both start and end tag remain highlighted whenever the caret is within either of those tags. (The caret = the text cursor, as opposed to the mouse cursor).
        I've already looked into that, but as (I think) that requires responding to notifications, I figured I'd best get it to work by command first. One step at a time.  It's definitely on my to-do list, but don't count on it anytime soon...

        Currently the to-do list looks like this:
        * Make it play nice with PHP & ASP tags (either highlight those separately or ignore them)
        * Upload the source to the Npp-plugins projects on SF.net
        * Write up a little readme, include that in the distribution zip, and post it on some web page
        * Make it behave like bracket highlighting
        * Make tag detection case-sensitive in XML files

         
1 2 > >> (Page 1 of 2)