Sublime Forum

Shortcut to goto "HTML-TAG Open/Close Element"

#1

Hi guys,

I am searching for a key command and don’t know if sublime already has it??

OK, let’s say I have an html page loaded with an Unordered List:

[code]

  • .....................
  • .....................
  • .....................
  • .....................
  • .....................
[/code]

The curser is on the opening “

    ”… is there a key command to jump the the closing tag “
”???

This would be really cool!! I find it takes me a lot of time to navigate thru the html code and this “hierarchy” feature could come in really handy…

Any ideas?

Thanks for your support
Steven

0 Likes

#2

I don’t know if there is a shortcut for this, or whether someone has already build a command for it :question:

In the meantime, you could make us of the code-folding arrow, or Ctrl-Shift-a (on Windows) selects the matching closing tag.

0 Likes

#3

I think Sublime definetly needs this shortcut. There more I edit HTML the more I totally miss it… :-/

Does anyone know regular expressions good enough to program an macro and post it here???

0 Likes

#4

I don’t know if you use BracketHighlighter, but I could easily add such a feature to that plugin. Since I have a simple framework for tapping into matched brackets and tags, I could throw it together in no time. I will try and get that in when I get a little free time, maybe today.

0 Likes

#5

Maybe it’s just me but I’d rather use goto symbol to get to where I need to be.

0 Likes

#6

Bracket Highlighter now jumps between tags better. Alt + Up and Alt + Down will jump you between open and closing tags. This is the same shortcut to jump between brackets as well in BracketHighlighter.

Do to the way the code changed, you may have to restart ST2 for it to start working proper.

0 Likes

#7

awesome thanks a lot =)

0 Likes

#8

Oh yeah!!! THanks that works great!!!

0 Likes

#9

Now I just got another idea…

lets say I am at the end of the “” and I press ALT-DOWN. Right now there is nothing happening… Instead of doing nothing it would be cool if the highlight would now go to the next TAG. So if the is a “

” right underneath the
    -> the upper DIV will be highlighted. It would be good to stay in the same DOM hirarchy level in this case… (don’t select the inner div elements.

    This would be cool as you could use those 2 commands to just navigate quickly thru the whole html!!

    Great stuff!

    0 Likes