Richard Snazell
Richard Snazell

Reputation: 242

How do I add a new cursor at the next occurrence of selected text?

In Sublime Text, I can use Ctrl+D or Command+D (Mac OS) to quickly add new cursors at the next occurrence(s) of the currently selected text. How can I do this in VSCode?

Upvotes: 2

Views: 953

Answers (3)

user4023394
user4023394

Reputation:

Box Selecting

Windows : 'shift' + 'alt' + 'Mouse Left Button'

macOS : 'shift' + 'option' + 'Click'

answer taken from this question

Upvotes: 0

Richard Snazell
Richard Snazell

Reputation: 242

Thanks Benjamin. For reference, this functionality has been added (since v0.3.0):

  • ⌘D selects the word at the cursor, or the next occurrence of the current selection.
  • ⌘K ⌘D moves the last added cursor to next occurrence of the current selection.
  • ⌘U undoes the last cursor action.

Upvotes: 4

Benjamin Pasero
Benjamin Pasero

Reputation: 124314

We are preparing for a new version of VS Code that will have this feature enabled. It should be released next week!

Upvotes: 1

Related Questions