Select all occurrences in a file

Quickly select all occurrences of a piece of text in the current file

Do you want to select all the occurrences of a piece of code?

How to use:

Press ⌘⌃G (macOS) / Ctrl+Alt+Shift+J (Windows/Linux).

After the selection is complete, you can start editing all the fragments as if they were all the same one.

Pro tip:

If you plan to use this feature to rename something, then you should have a look at our Rename refactoring, which is designed to work safely across multiple packages, not just at the file level, with full preview and undo support.

Related Resources

Improve Code Readability and Navigation
Discover how to manage code visibility with code folding in Go
Create a function in another package
Type a non-existing function name and generate its implementation in a package of your choice
Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions