I'm trying to select all of the results found by a regex find so I can modify them all (not replace them with text!), for example, making them all uppercase with Cmd + K -> Cmd + U
. I'm aware that I could do them one by one via repeating Cmd + G, Cmd + K, Cmd + U
, but for a large file this simply isn't practical or realistic. I'm also aware of using bash and may other scripting alternatives, I'd like to find a way to do it inside Atom, I'm happy to install an external library if needed.
Things I've tried:
Cmd + D
, this just selects the next instance of that exact letter, not the next result matching the regex.Cmd + Shift + G
and alternatives (alt/right shift/ctrl), Cmd + G
selects the next result matching the Regex, which is in the right direction.Cmd + Z
and hoping it will stay selected, it doesn't.You can select several occurrences of the same word using ctrl + d repeatedly, or select all the occurrences by typing alt + F3 .
You can also find and replace throughout your entire project if you invoke the panel with Ctrl+Shift+F .
This takes advantage of a built in regex feature in the Atom text editor. It may work in other text editors as well, so give it a try in your favorite text editor or IDE.
Pressing Alt + Enter
will select all instances matching your Find results. This works for RegEx search also.
Source: https://github.com/atom/find-and-replace/pull/290
On Atom 1.57 (nov 2021) clicking on "find all" selects all matching items, esc to exit the search box, then copy :)
Alternatively you can select all whit the menu -> find > select all.
On mac also selects all by pressing ^ + cmd + G
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With