Search and replace in a specific filename


#1

Hi,

I’m new to Amon. I would like to search for the word “state” and replace it with “province” in all of province.md files in “data/provinces” directory. Is it possible to do that in Atom?

I checked the documentation, it mentions “Glob pattern”, but I haven’t used it before.

Thank you for any suggestions!


#2

You’ll need to use the Find In Project feature. You’ll need to set the “File/directory pattern”:

Something like data/provinces/**/province.md should work. You probably want to only set the “find” field and run the find to make sure that the glob (that’s the thing with the asterisks in it) doesn’t catch things you don’t want. Once you’re certain that it works, then run the replace.

:rotating_light: There is no Undo on Find in Project. :rotating_light:

So it might be wise to have a backup or be sure that you’ve committed your latest changes if you’re using source code control.


#3

Thank you! It really helps!