Sublime like select matching and edit them all


#1

Is there a feature in Atom that does what Alt-F3 does in Sublime? Select all matching and allow you to edit them? I’ve been looking but can’t find it! It’s gotta be here?


Why Atom doesn't have feature like when we selected on one string then another if the same string that selected it'll just focus
#2

There’s a package that does what I think you’re asking for on double-click: Highlight Selected. It was mentioned in a couple other threads.


#3

Thanks! I think that just selects all the versions of the string - I’d like to be then able to edit all those occurrences of the string at once.


#4

You can always use ⌘D to select the next occurrence of a string with a cursor for each. I suspect it would be pretty easy to extend the Highlight Selected package to add the exact functionality you’re looking for.


#5

For all occurrences of a selected string you can use ⌘+CTRL+D on Mac, which is the same for Sublime Text. You seem to be on Linux (or maybe Windows?) but it may be the same binding for Atom.


#6

It comes included in the latest version. I don’t know when it was first included.

This is the command in OSX

'.platform-darwin atom-text-editor':
  'ctrl-cmd-g': 'find-and-replace:select-all'

#7

U can use highlight-selected and select the word by double clicking and hit ctrl+D to select all the occurences one by one and edit them simultaneously.


#8

Windows -> find-and-replace:select-all - alt+f3


#9

You can just put your cursor on that word, then click “Ctrl+D” (In Linux ) or “⌘+D”(In Mac) many times, then you can select as many as same words in current file. Then you can edit them, delete them together. Never try in Windows. But you can try it there. Hope helps you. Cheers!


#10

Doesn’t quite do what the request is,. which is actually editing the selections and not just highlighting.


#11

Ohh Lovely, ctrl+D works perfect in Windows! thanks


#12

You’re right … the highlight-selected package doesn’t do what they were asking. But I did give the correct answer just two messages later. But hey, I’ve learned a lot in the last two-and-a-half years :grinning:


#13

You can select all in find using Alt-Enter instead of just Enter. https://github.com/atom/find-and-replace/pull/290


#14

CTRL+D = Select one at time.
ALT+F3 = Select all.


#16

Thanks to @Pier, your suggestion worked like charm on MacOS.

For selecting one at a time: ⌘ + D
For selecting all occurrence at once: ⌘ + CTRL + G