I have a problem when I’m trying to expand my selection to any empty HTML tag it fails and cancel all my selections. that does happen only on Sublime Text 3
I had no issue using it in Sublime Text 2. can you please look into that and let me know if you have any ideas!
I’m using build 3114 on Mac.
'Expand selection to tag' ST3 issue
Thanks for your reply @kingkeith.
The link you provided is very helpful, unfortunately, this isn’t my issue case.
what I’m trying to do is to mark multi-selections and then move my cursors inside these tags even when it doesn’t have content in it.
this achieved by ‘Expand Selection To Tag’ (cmd + shift + a) option. it does work when i have anything inside these tags. usually, i make these tags empty to fill it out by this way
Confirmed (on 3113 on Windows 7 x64). Reproduction steps:
- open a new tab
- set the syntax to HTML
- type
html - press Tab
- move the cursor to
<ti|tle></title>where|represents the cursor -
Selectionmenu ->Expand Selection to Tag
0 selection regions
Expected behavior:
- put the cursor at
<title>|</title>and try again, and it selects everything between the|chars:|<title></title>|
Please consider logging an issue here for it: https://github.com/SublimeTextIssues/Core/issues
as command: expand_selection {"to": "tag"} is built in to ST
Found another issue while experimenting.
- Have these contents:
<head><title> </title></head>
- Run the expand selection to tag command (anywhere, can take a few iterations) until you get this:
<head>[<title> </title>]|</head>
where [, ], and | represent a selection (and the caret position).
3. Run the command again any number of times and observe no change in the selection.
For comparison, this works:
<head> <title> </title> </head>
@FichteFoll you have a better way of representing selections than I do 
yeah, I can confirm the same. It should expand up to the “next” parent tag each time you run it, as it does to get from <head><title>[ ]|</title></head> to <head>[<title> </title>]|</head>
Okay, I have logged it here: https://github.com/SublimeTextIssues/Core/issues/1223
@kingkeith @FichteFoll Thank you guys for experimenting on this issue and logging it on Github.