In VS Code, pressing Shift+Command+L creates a cursor for every occurrences strings and you can modify them all at once. Is there a similar shortcut for the JetBrains IDEs such as Intellij IDEA?
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
Edit | Find | Select All Occurrences action does it:
Yes there is. You can read more about ways to create multiple cursors and selection ranes on their dedicated help page: https://www.jetbrains.com/help/idea/multicursor.html (I’ll use links for the Intellij IDEA help pages, but you the instructions should be similar for all the IDEs in the JetBrains family. To get the help pages for a specific one, visit their general help page, then select an IDE, and then use the search function to search "multicursor").
In particular, see this section named "Select multiple occurrences of a word or a text range" Here’s an excerpt when the Shortcuts mode is set to "Windows" (visit that link and switch the shortcut mode to whichever platform you are on)
Other functions include:
You can do it with the mouse while holding Alt+Shift+Click the target location to add another caret. You can Alt+Shift+Click one of the existing carets to remove it.
To add carets above or below the current caret using the keyboard, Press Ctrl twice, and then without releasing it, press the up or down arrow key. Or you can enable the column selection mode (press Alt+Shift+Insert) and then press Shift+Up/Shift+Down.