Sublime Forum

expand_selection on scope

#1

expand_selection on scope.

Using this command inside quotation marks it expands including the quotation marks, but when using it inside brackets for example the selection expands untill inside the brackets.

I think the correct behaviour is the second one, why it behaves diferently? is there some config im missing?

0 Likes

#2

Depending on the language syntax you’re using, the string scope includes the quotation marks. Brackets are generally used to enclose other scopes, but most of the time are not a part of that scope, so they are not selected when using this command. The behavior that you are seeing is the behavior that should be expected.

If you want to select the contents of strings, but not the quotes themselves, consider installing the Expand Selection to Quotes package (it’s marked ST2 only, but works without modification on ST3).

0 Likes