Sublime Forum

SublimeTagmatcher

#1

If you click inside the begin tag, it will highlight the end tag, and vice versa.

GitHub
Project: github.com/pyparadigm/SublimeTagmatcher
Direct Download: github.com/pyparadigm/SublimeTa … all/master

Screenshot
https://github.com/pyparadigm/SublimeTagmatcher/blob/master/ssexample.png?raw=true

0 Likes

HTML Tag Match
Open and close syntax highlight
Bracket highlighing
Tag match highlighting
#2

Looks pretty neat!
Can you move the files in the root folder so the package manager can install it with no issue? Right now the package manager (also if i clone the git repo) it creates this structure: User/SublimeTagmatcher/SublimeTagmatcher and it should be only User/SublimeTagmatcher.

Also, can you do the very same thing for brackets match? I mean instead of detecting tags to detect { } ( ) on js/php files (and other) ?

Thanks!

0 Likes

#3

Very nice. Still needs a bit of tuning, though. Using the snippet

[code]

Sumoview [/code] there are couple of incorrect matches:

] matches /]]Both tags match /]] matches the second tag/]] matches the second tag/]

Once these bugs are fixed though, this will be make working with html/xml files a lot nicer.

0 Likes

#4

It does that because it is malformed XML/XHTML, it should be /> on self closing tags.

[code]

Sumoview [/code]
0 Likes

#5

[quote=“iamntz”]Looks pretty neat!
Can you move the files in the root folder so the package manager can install it with no issue? Right now the package manager (also if i clone the git repo) it creates this structure: User/SublimeTagmatcher/SublimeTagmatcher and it should be only User/SublimeTagmatcher.

Also, can you do the very same thing for brackets match? I mean instead of detecting tags to detect { } ( ) on js/php files (and other) ?

Thanks![/quote]

I changed the folder structure, but I did not understand the other part?

0 Likes

#6

[quote=“pyparadigm”]It does that because it is malformed XML/XHTML, it should be /> on self closing tags.

[code]

Sumoview [/code][/quote]

That’s only true for XML/XHTML, not standard HTML: http://wiki.whatwg.org/wiki/FAQ#Should_I_close_empty_elements_with_.2F.3E_or_.3E.3F

0 Likes

#7

A picture is like a tousand words. Therefore: screencast.com/t/cuuJovy8 :smile:

The editor adds some basic highlight for bracket matching but sometimes the underline is somehow invisible. I’m thinking that outline will make them more… visible.

And Jon doesn’t want to add this feature :smiley: (even if there are almost 200 votes for this)

0 Likes

#8

Nice plugin! Would be nice if a brackets costumization could be done with some kind of plugin like this one.

0 Likes

#9

This is great, thank you!

It has already been mentioned that self-closing tags are matching the next available </ when they don’t end with a trailing />. I will continue using this as it is very useful, but some improvements will be appreciated :smile:

The most common tags this applies to are: link, meta, img, input, br, hr.
Less common: frame, area, col, base, basefront, param.

Perhaps the best way to ensure accuracy is to parse the file for the full tag name instead of the first unclosed </ (obviously including exceptions for the above tags). This will also solve inadvertently matching those pesky overlapping tags like “

0 Likes

#10

Thanks for the suggestions, I added support for common HTML elements like link, meta, etc. without self closing and fixed some other issues.

0 Likes

#11

Hello @pyparadigm! And what abot @iamntz question?

Thanks.

[quote=“iamntz”]

A picture is like a tousand words. Therefore: screencast.com/t/cuuJovy8 :smile:

The editor adds some basic highlight for bracket matching but sometimes the underline is somehow invisible. I’m thinking that outline will make them more… visible.

And Jon doesn’t want to add this feature :smiley: (even if there are almost 200 votes for this)[/quote]

0 Likes

#12

[quote=“oriceon”]Hello @pyparadigm! And what abot @iamntz question?

Thanks.

A picture is like a tousand words. Therefore: screencast.com/t/cuuJovy8 :smile:

The editor adds some basic highlight for bracket matching but sometimes the underline is somehow invisible. I’m thinking that outline will make them more… visible.

And Jon doesn’t want to add this feature :smiley: (even if there are almost 200 votes for this)[/quote]

I’m going to add that functionality within a couple weeks.

0 Likes

#13

wow, sounds verry nice :smile: take care

0 Likes

#14

Nice plugin! I just tested the latest version with a non-XHTML site I’ve been working with and it seemed to handle it just fine.

I’ve also added it to the Package Control default channel so it is easy to install and keep up to date.

0 Likes

#15

Is just me or ST2 become better and better on each day?

0 Likes

#16

Not until Jon will add brackets costumization way!!!

0 Likes

#17

This is great! Should be in SublimeText2 itself :wink:

0 Likes

#18

Hi, I’ve just submitted an issue.

Closing tags will only be outlined if the tag is followed by a space or new line.

The following examples will outline the closing tag:

[code]<a href"#">link

  • link
  • [/code]

    The following examples will not outline the closing tag:

    [code]link

  • link
  • [/code]
    0 Likes

    #19

    [quote=“skaet”]Hi, I’ve just submitted an issue.

    Closing tags will only be outlined if the tag is followed by a space or new line.

    The following examples will outline the closing tag:

    [code]<a href"#">link

  • link
  • [/code]

    The following examples will not outline the closing tag:

    [code]link

  • link
  • [/code][/quote]

    Fixed Issue, as well as Smart Template issue

    0 Likes

    #20

    Just wanted to say that I bloody love this! Thank you so much for creating it - I don’t know how I lived without it before.

    Cheers

    0 Likes