Sublime Forum

Jump to ending HTML tag


In an HTML file I can place the cursor on the opening tag (e.g. <a>) and see that ST places a thinn underline at the ending tag (</a>). When the ending tag is pages below, I tend to use the CTRL+m shortcut to jump to the ending tag. But this is not working as I expect. Is there another shortcut for this or would it be a good idea to add this shortcut?




Emmet has this functionality to jump to matching tag.

This is the default keybinding for it.

	"keys": ["ctrl+alt+j"],
	"command": "emmet_go_to_tag_pair",

Just go to Preferences: Emmet Key Bindings. You can see all the default key bindings of Emmet on the left side. Just look for

// Go to Matching Tag/Tag Pair
// {
//     "keys": ["ctrl+alt+j"],
//     "command": "emmet_go_to_tag_pair"
// },

copy to the right side & un comment the key binding part. You can change it from ctrl+alt+j to anything you want.
I am not sure if ST has this built in though.



Thanks. Nice to see there is a workarround.
I just think that this should be default in ST. The underline is already happening as for paranthesis. So it’s natural to expect CTRL-M to be working also with tags.