Select all and edit all at once


#1

I’m switching to atom from sublime text 2 and i’m pretty sure there’s a package or a built-in keyboard shortcut for this useful feature:

i used to highlight (for example) ìmgon an html file, then pressed ctrl+cmd+g and it would highlight all the ìmgs in the document and i could edit/add stuff all at once live, without a find a replace.

it’s better described in this accepted answer of stack overflow: http://stackoverflow.com/questions/16844657/sublime-text-select-all-instances-of-a-variable-and-edit-variable-name

is this an atom feature? how do you do this on both a mac and windows?

thanks :smiley:


#2

You can do exactly what you described and it will work in Atom. Highlight a word, press Ctrl+Cmd+G to highlight all the other occurrences and then just type the replacement text.


#3

lol, weird how this wouldn’t work until yesterday. sometimes keyboard shortcuts won’t work on atom (atom beautifier for example)… thanks anyways :slightly_smiling:


#4

Hi guys, can you please share the combination for this on Windows?


#5

It’s the find-and-replace:select-all command:


Multiple Selections
Multiple Selections
#6

I need a button on the Find / Replace screen for this. I have Googled and loaded this page, and your helpful answer, too many times!


#7

by default on windows

to make it work on ctrl+g: add in keymap.cson :

 'body':
     'ctrl-g': 'find-and-replace:select-all'