Select all found RegEx results in Atom

Atom Editor

Atom Editor Problem Overview


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.

Example of selection

Things I've tried:

  1. Cmd + D, this just selects the next instance of that exact letter, not the next result matching the regex.
  2. Cmd + Shift + G and alternatives (alt/right shift/ctrl), Cmd + G selects the next result matching the Regex, which is in the right direction.
  3. Changing all of the selected text to a unique string, highlighting them all, pressing Cmd + Z and hoping it will stay selected, it doesn't.
  4. Lots of Googling and reading though Atom discussions.
  5. Reading Atom's documentation on the subject

Atom Editor Solutions


Solution 1 - Atom Editor

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

Solution 2 - Atom Editor

On Atom 1.57 (nov 2021) clicking on "find all" selects all matching items, esc to exit the search box, then copy :)

enter image description here

Alternatively you can select all whit the menu -> find > select all.

On mac also selects all by pressing ^ + cmd + G.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAaron CritchleyView Question on Stackoverflow
Solution 1 - Atom EditorJohnoView Answer on Stackoverflow
Solution 2 - Atom EditorNicoKoweView Answer on Stackoverflow