atom / find-and-replace

Find and replace in a single buffer and in the project
MIT License
242 stars 219 forks source link

There's no way to exclude paths from a search #149

Closed mattbasta closed 9 years ago

mattbasta commented 10 years ago

When searching, filters can be specified. However, there's no way to exclude paths from the search.

E.g.: *.js, -*.min.js cannot be used to exclude minified files from a search of JS

MichaelJCole commented 8 years ago

FYI, this bug is closed. Posting here doesn't help fix your issue, and emails a bunch of people who can't help. For best results, please open a new bug. Thanks!

MohammedAl-Mahdawi commented 8 years ago

In order to search in a folder within my project folder and ignore the .git folder within it, I did the following selection_108 Just added , !.git after my folder path.

stringaro-leo commented 7 years ago

this works for me: !**/node_modules/**,!**/bower_components/**

findsje commented 7 years ago

Thanks, this worked for me. Was giving up on this! */.html was what I needed.

eugenealegiojo commented 7 years ago

Nice! This works for me as well: !*.min.js

mrahulreddy commented 6 years ago

This works for me !node_modules

jorgeorpinel commented 6 years ago

Not working at all for me ): The "Exclude VCS Ignored Paths" option also not working.

image

jrial commented 6 years ago

@jorgeorpinel could it be that your file was not saved at that time? If so, see #647

ghost commented 5 years ago

Just ran into this issue myself. I wanted to find all instances of a keyword within a directory, but wanted to exclude the search from a single nested directory within.

Demo File Structure:

project-name/
    search-this-directory/
        ...
        ...
        ...
        exclude-this-directory/
            ...
            ...
            ...

File/Directory Search Pattern - FAILS

project-name/search-this-directory, !project-name/search-this-directory/exclude-this-directory, 

After several attempts, I found that each additional file/directory pattern built on the previous... Therefore, in order to ignore the nested directory, we simply ignore that one single directory after defining the search context.

File/Directory Search Pattern - WORKS

project-name/search-this-directory, !exclude-this-directory,