DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Select Next Occurrence

Explained by Updated

What is Select Next Occurrence?

Select Next Occurrence: Add the next match of the current word to your selection so you can edit several at once. Select Next Occurrence adds the next match of the current word or selection to your selection, with a cursor at each. In VS Code and many other editors press Ctrl+D or Cmd+D; in JetBrains IDEs press Alt+J or Ctrl+G.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Select Next Occurrence

How is Select Next Occurrence used in practice?

Press it a few times, then type, and every selected occurrence changes at once. It is ideal for renaming a variable within one function, or editing the same attribute in several lines of HTML.

What should you keep in mind with Select Next Occurrence?

You can skip an occurrence you do not want with Ctrl+K Ctrl+D in VS Code, or select all occurrences at once with Ctrl+Shift+L. Because it matches text rather than code meaning, it can catch unrelated matches, so watch what gets selected. For renaming across files, Rename Symbol is the safer tool.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with S

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.