Skip to content

Request for Ctrl+D (find next): if no text is selected, find next whole word; if selected, match all occurrences instead (like in Sublime) #19825

@CanisLupus

Description

@CanisLupus

In Sublime Text, if you have nothing selected when you press Ctrl+D, it first selects the word where your cursor is at (VSCode also does this). Then, the next Ctrl+D will automatically use whole word search, regardless of the whole word setting.

If you have this:

wordword
word code word

And begin Ctrl+D'ing on the first standalone "word" in the second line, you will get:

wordword
[word] code [word]

(selections marked with [])

In contrast, if you already have text selected (with your mouse, or Shift+Arrow combinations), Ctrl+D will search WITHOUT whole word (i.e. matching all occurrences of the selected text even if they are not a complete token)

If select the first "word" in "wordword" with your mouse, you will get:

[word][word]
[word] code [word]

I hope my explanation was clear. :)

I understand that this might be something some users wouldn't want by default, but at least an option would be incredible, because this subtlety in Sublime avoids constantly changing whole word modes (case is respected either way) and I find it very productive.

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)editor-multicursorEditor multiple cursor issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions