Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Add Next Match to Selection" Should perform word-only matches unless the user has manually highlighted text #12789

Open
core-ai-bot opened this issue Aug 31, 2021 · 0 comments

Comments

@core-ai-bot
Copy link
Member

Issue by ShimShamSam
Tuesday Aug 26, 2014 at 00:58 GMT
Originally opened as adobe/brackets#8861


In Sublime's implementation of multiple cursors, if you haven't selected any text and the text cursor is within/adjacent to a word (ie. you clicked the middle of the word), it will select the full word for you. Brackets does this, but Sublime will go into a "full word only" mode so that continuing to press the shortcut key will highlight the next occurrence of the word ONLY if the occurrence is the full word. So "foo" will match other instances of "foo", but NOT "foobar".

If you manually highlight text and press the shortcut key, it will highlight the next occurrence of the text, but in this case, the text can occur as part of a longer string. So highlighting [ba]nner and pressing the shortcut key will match [ba]nk. Currently Brackets only supports this method (or at least for me, it does in the Ubuntu release).

The use case for the first method is for quickly renaming a variable within a function. If you have the variables "foo" and "foobar" and want to rename "foo" to "baz", you cannot do so without inadvertently selecting part of "foobar".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant