Reputation: 259
The Command + D or Ctrl + D (in Windows) keybinding in VS Code allows you to add the next occurrence of a selected portion of code to your current selection.
Is there an equivalent in RStudio?
Upvotes: 5
Views: 1533
Reputation: 398
You might be looking for the Find and Add Next
command that is available in the RStudio Keyboard Shortcuts Menu.
For selecting single words it works without initial selection as well.
Simply place your cursor somewhere on the current word, press Cmd+D
(or whatever keybinding you have assigned) and it first selects the current word and then consecutively adds the next word occurence to the selection.
To my knowledge there is currently no way to skip an occurrence and continue the same selection afterwards nor to go backwards and consecutively add previous occurences to the selection whereas both of these are possible in Visual Studio Code.
Upvotes: 5
Reputation: 8832
There isn't an equivalent shortcut, but you can get cursors on all occurrences by pressing Cmd/Ctrl F, then selecting "All" matches:
Upvotes: 2