I'm looking for a class which is defined in a Koin module file somewhere in my project. The filenames of all those Koin modules are "*Module.kt".
I could do cmd+shift+F to search for "TheClass" everywhere, but that gives me too many results and I don't want to go through all of them manually. I'd like to only search in files with the above mentioned filename pattern.
Another thing I could do is to use alt+F7 or cmd+B on the TheClass itself to see its usages, but again that leads to too many results.
Is there a way (using Android Studio) to search smarter for this?
I found out that when using "Find in Path" with cmd+shift+F you can put more in the file mask than just "*.kt". I've changed the file mask to "*Module.kt" and got the desired result.
Related
It should be quite simple, but sometimes I found that searches in VSCode do not work as expected.
In this below example, I just want to search the string stat in all the JavaScript files in the folder ./ocean-data-qc/ocean_data_qc_js. But, in the search results, I get files of all kind of types:
I also want to search in the subfolders files.
Am I doing anything wrong?
With the expression ./ocean-data-qc/ocean_data_qc_js,*.js it will search across all the files of the path ./ocean-data-qc/ocean_data_qc_js and then it will search on all the js files of the project. The result will be the union of both searches
Instead, the pattern should be ./ocean-data-qc/ocean_data_qc_js/**/*.js to make just one search in all the js files in the folder and subfolders. But it is not working as expected because the files in the .gitignore are included in the search. So, in some way, the pattern in the include section is overriding the excluded paths.
I have found an issue to answer why the .gitignore is not taken into account in that case. As I am working in multiroot mode, I found two solutions that work:
Just using the root folder of the project where I am searching: ./ocean-data-qc/**/*.js. Like this .gitignore is taken into account.
The other alternative is to use the search.exclude attribute in the VScode settings.
Note: The important sections in the VSCode docs: Multiroot search. Advanced search options
Follows this page https://www.jetbrains.com/help/pycharm/2016.1/find-and-replace-in-path.html?origin=old_help#mask , it should be able to exclude many files using "!" symbol in front of the regular pattern like: *.java, when doing text search inside IntelliJ projects.
On my project, when I fired Ctrl + Shift + F to do text search for string xyz. There's over 100+ results return in both *.ftl and *.java files. I tried to reduce the results on only ftl files by changing the "File mask(s)"-Option to "!*.java" . But it did not work! The result list is empty!
Googling on the excluding file pattern results in creating custom file filters for each particular search, which I don't want to maintain!
Do I miss something here or IntelliJ is just bad on this function (I'm using IntelliJ 15)? With Eclipse, the "File mask" was amazing!
You have to use
!*.java instead of !.java
As for IDEA 2019.1 Ultimate, it works for me(exclude with !*.yml or anything else).
If it does not in yours, as you only as .ftl file to exclude, why not add mask as *.java?
PS: what does not work is exclude some path, like "all files under out/ folder". With !out/* or anything ales it does not work.
Forget about File Mask and use Scope:
In Scope the options are unlimited where you can select folder include/exclude files or folders.
Excluding file paths in the Find in Path dialogue was not added until IntelliJ 2016.1 per this IntelliJ forum response.
I've looked around quite a bit for an answer to this, but I cannot seem to find what I need. Is it possible with SublimeText3 > Find in Files to do a search for all files that DO NOT include a string?
I've tried toggling the Regular Expressions button beside "Find:" and entering a value, but I'm not a regex pro, so I may be doing it wrong?
For example, I want to find all files in a designated folder that DO NOT have the following string:
social-links
Any help would be greatly appreciated.
Search for all files in your directory in question (for anything, like a space or the letter e...assuming every file has a space or letter e!), and copy all those file-paths to a new file.
Search for all files with the word, and paste that path-list into a second file.
Sort both files, then compare them to see which lines--which paths--are missing from the has-the-word file. Those are the ones you want.
As far as a single find-in-files search, I don't see how you would do that in Sublime or any other basic text editor. Here is some more information:
https://unix.stackexchange.com/questions/26836/how-can-i-find-all-files-that-do-not-contain-a-text-string
Find files that does not contain a string
How to find all files that do NOT contain specific string in windows environment Visual Studio or any other IDE?
Good luck!
I've tried search for this but have been unable to find anything on this. Basically, I'd like to be able to search the project that I'm working on but only search files with certain file extensions. Currently it searches everything and this adds time to the search that will never return results for what I'm looking for. Is there a way to do this or am I just out of luck?
Does your search dialog not look like this?
Ctrl + H or Search > Search will bring up this dialog which allows you to put in a file name pattern to limit your search... what are you doing?
I'm not sure if fuzzy is the correct way to phrase this, so allow me to explain what I want to do.
Often times, I'm looking for files that I know are within a particular directory in my local SVN working copy, and I have an idea what directory they're in, but don't want to think of the precise path or there may be several copies of it in different branches. For example, suppose I want a file "eligibility.py" that I know is somewhere under a "trunk" directory and in a directory named "interface" below that.
It would be ideal if I could just type in something like this at the anything-for-files prompt:
trunk interface eligibility.py
Is there any way I can do something similar to this?
I figured it out. This functionality is included with anything-match-plugin.el.
I like 'ifind myself.
M-x ifind /path/to/trunk/eligibility.py
I like using file-cache and ido-find-file: http://sachachua.com/wp/2009/01/06/emacs-file-cache-and-ido/
In Icicles you can find files by matching not just the relative file name but any parts of the path. You can use substring, regexp, and fuzzy matching. You can AND together multiple search patterns (progressive completion). See multi-command icicle-locate-file.
http://www.emacswiki.org/emacs/Icicles_-_File-Name_Input
You also mentioned fuzzy file-name matching, but that wasn't what your description corresponds to. If you do want to also do fuzzy file-name completion of various sorts then see this:
http://www.emacswiki.org/emacs/Icicles_-_Fuzzy_Completion