-
Notifications
You must be signed in to change notification settings - Fork 196
There's no way to exclude paths from a search #149
Comments
You can try the |
Something like |
Searching for |
I am seeing the same buggy behaviour. If I do a search for something with the path pattern of "!directory/to/ignore" it search only in that directory rather than ignoring it and searching everything else. |
'!' also doesn't exclude a file or directory for me, and using it multiple times makes no difference. |
Using the But I don't see a solution around it other than fixing how scandal handles directory/file filtering. |
Moving from bug to enhancement. |
TextMate just added this feature on 2014-04-18 (v2.0-alpha.9539), so it may be useful to have as a reference: They describe their method as follows:
|
This comment has been minimized.
This comment has been minimized.
👍 Its a really important feature because it finds about 1000 results in my log/ directory when i search something and so the search gets reaaalllyy slow... |
This is [now] marked as an enhancement, but with the horrible results from logfiles and the like, find is barely usable. Please consider this a bug. |
This comment has been minimized.
This comment has been minimized.
Exclusions for Find in Project is definitely a big deal. In web dev, just being able to |
I second this, I too get 1000+ results here that make a search replace impossible to do. |
This issue is one of only a small handful of things blocking me from using Atom. If I can't filter out the |
This comment has been minimized.
This comment has been minimized.
I think this should be addressed by: atom/scandal#17 Unless anyone knows why atom currently disables negation? |
The issue is not fixed, because it only works with file patterns. For example, trying |
My case is quite simple, in 1.0.7 I have this:
And yet when I make a search in my project I can find results in my |
Not working for me in Atom v1.0.10 in Windows 7.
Yet when I right-click on my project root folder, click on "Search in Directory" and search a word, results from ".git" folder are shown. However it works when I add this in the "File/Directory pattern":
Am I doing it wrong or is it a bug? I tried everythink I could, including modifying the "config.cson" file and adding the "exclusions" line. Nothing worked. EDIT: my goal is to avoid writing the !.git/ filter everytime. That's all. |
I just edited my config and got something like this to work. I added an ignoredNames section to my config.cson (Preferences -> Open Config Folder -> config.cson):
and don't get results in these directories:
Not saying there isn't a bug, but this worked for me on 1.0.7 on Linux Mint |
@MichaelJCole This works for me as well on 1.0.15 on Mac O.S. |
@MichaelJCole Thanks!! Worked for me. Atom.io: 1.0.19 Would be great though if we have an option where we could input a list of directories of where (and not) to search. |
Just use commas and start the path from the root project directory. Works well. |
Is there a way a exclude files from the command "find file"? I've added Edit: So |
Bless you @MichaelJCole Works for me on 1.0.19 on OS X El Capitan. You are awesome! |
Feature is still buggy in 1.1.0. A file can still pop up if the path matches the file/directory pattern. I.e. If you do "Search in directory", files in ignored folders will show up (and promptly crashes the editor). |
Can you make a new issue giving the exact values you have in each text box + if possible, a test repo? I know it will do this in some case due to some ambiguity. |
@MichaelJCole Thanks so much for that man. Works well and removes a major frustration with Atom for me. |
@MichaelJCole thanks for that quick fix. I added 2 project which led to 2 million files being indexed, it was crazy... Imho it should be as easy as right clicking on a folder - exclude from index or something, where you could then take just that specific folder, or use it as a pattern. |
Ok I finally got this working, had to add
|
+1 @MichaelJCole @leongaban Trying to exclude paths by typing them in the search does not work for me. |
+1 Would be great to ignore folters (e.g. 'bower_components' or 'node_modules') in the search bar. @leongaban your solution worked for me, too. thx ;) |
Right Click Folder -> Search in directory Still searches in '.svn' despite that being in ignored names (both in core settings view and in config.cson). |
Thanks @leongaban |
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! |
this works for me: |
Thanks, this worked for me. Was giving up on this! **/*.html was what I needed. |
Nice! This works for me as well: |
This works for me |
@jorgeorpinel could it be that your file was not saved at that time? If so, see #647 |
Educate the user on how atom excludes files/directories in the placeholder text directly. I discovered this by searching the issue queue. Ref: atom#149
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:
File/Directory Search Pattern - FAILS
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
|
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 JSThe text was updated successfully, but these errors were encountered: