Github search for matches in different filenames - github

I use Github search engine pretty often to see how other users have used some function.
The problem is that there is a bunch of repeated results due to copied repositories. Is there any way to search for a text but show only the matches in files with different name?
Thanks

I believe this is what you're looking for. First, search for something. Select "Code" from the menu on the left, and at the bottom you'll see Advanced Search. Find this option and change whatever you like.

Related

Is it possible to force Quick Open to take a query from the current selection in the editor?

The current editor I have open contains the name of a file or part of the name of a file that I have in my workspace. I want to search for that file by selecting the text of that name from the editor, and then putting that text in the Quick Open search box. Currently, I need to manually copy and paste the text, but I want to have behaviour similar to the cmd + F search box where the selected text from the editor immediately appears in the search bar when it is opened. Is it possible to configure Quick Open to do this as well? Or maybe there is an extension for this?
At the time of this writing, this is currently not configurable.
If you look in the settings, all the settings that allow enabling or disabling this behaviour contain the word "seed" in them: search.seedOnFocus, search.seedWithNearestWord, editor.find.seedSearchStringFromSelection. From my reading/searching, there is no other setting with the word "seed" in it.
I googled "github vscode issues quickopen seed" and found this GitHub feature-request on the VS Code GitHub repo: Fuzzy quick open should use selected text as a starting point #59957 asking for such behaviour to be the default behaviour. The issue didn't get enough support from other users to get added to their backlog (a feature request needs to get a certain number of thumbs up reactions from users within a certain time period after it is created to get considered for implementation), so that feature-request is now closed.
If you want to get such a configuration option, create a feature-request issue ticket. If you want to increase your feature-request's visibility (and therefore its chance of getting enough user support), share a link to it on various programming platforms such as r/vscode.
I didn't find any extensions that do this by googling "vscode marketplace quick open seed" and looking at the top results, but maybe you'll have better luck with different queries.

VS Code multiple find all references

Currently, find all references will display the result in the sidebar, and a new find will always overwrite the previous find. How may I keep multiple find all reference sessions at the same time?
For search I have search editor which each occupies an independent tab, is there something similar for find all references?

Expand only one level in Eclipse search results

I'm searching in Eclipse and getting multi results on multiple modules.
When results returns I have option to Expand All.
Also option to expand a module using * key
But sometimes I need "high level expanding", just seeing the relevant classes or relevant packages in all modules without seeing the specific code lines.
I expected to open one level at a time.
I didn't find such option, is it achievable somehow? Can this requirements be added as an enhancement to Eclipse?
Opened an enhancement Bug 547752 - Add option expand one level at a time in search results
You can vote for it.
I gave 2 options for showing folders relevant to search:
First option is to open one level at a time on every click
Second option is to open all folders not including files in one click
First option is longer to get specific packages/folders
Second option is just open the packages/folders level of relevant files

Quick find a field or method in Eclipse's workspace

I find it extremely useful to use the Ctrl(cmd)+o shortcut on Eclipse to find a member field or method in a class (and use it again to get the ones from the super class).
However, I would like to know if there is a similar way to quickly search in the project and/or workspace for a field or method you know the name of but not where it is (similarly to how it is done to find a type Ctrl(cmd)+Shift+T or a resource Ctrl(cmd)+Shift+R).
If is not available where can I request it?
ctrl+o (cmd+o) opens the quick outline where you can search for a method within the current class.
Pressing ctrl+o again extends the search scope to the complete class hierarchy.
The closest thing I know of is the Java Search, which allows you to specify searching for a method, field, class, etc. If you're in the Java or Java Browsing perspective, Ctrl+H will open the Search dialog with Java Search as the selected type.
If you want to request a feature or enhancement, enter it into Eclipse's Bugzilla. Keep in mind that the backlog of feature requests is HUGE, so the most effective way to get yours noticed is to take initiative and submit a patch.
With the ctrl+h you will have some more options to search.
Under java search option you may find search for type, method, package, constuctor, field.
Also you may find "Limit To" option to narrow your search result and get precise search result!
The quickest way that I'm aware of is by using ctrl+h to bring up the Java search dialog.
If you are using mac cmd + shift + l will open a search box where you can search for any variable or method through out the project.
ctrl+h will bring up java search option. Enter your string and see. It also has different patterns like .java, .jsp, then select scope then search.
There's no way to do this in Eclipse. When you search for a method that's in a JAR Eclipse will not find it unless you already had the folder open.
You have to play around with it and use indirect ways of finding the method.

searching in eclipse

how can I search something in all files in a given folder in eclipse
also how can I search up, it's seems like only going down the document
sometimes I am working on single files, so there is no project defined. I know about the search in project feature
If you go to Search>Files... you'll have an advanced search dialogue where you amongst others can specify the scope to search in (all of the workspace, selected resources only etc.). Is this what you're looking for?
And also, if searching through a single file (+), you have the standard search dialogue where you can specify search direction to either forward or backward.
Search forward in file: Edit -> Incremental Find Next
Search backward in file: Edit -> Incremental Find Previous
Search in multiple files: Search -> File -> Containing Text.
Search files in a specific subdirectory: Select the sub-directory -> Search -> File -> Scope: Selected resources.
I reccomend that you learn the short-cuts for these tasks. (Key-combination is found right beside the menu-item.)
When you are searching "Java Resources" with "File Search" with "Selected resources" checkbox checked - you will not get any results.
To search recursively a chosen folder for any files:
Select folder (it has to be folder)
Select FileSearch with "Selected resources" checked.
Good luck
Use the Remote Search Feature. Here you can browse for local folders. Some stupid name...
If default eclipse search is not sufficient for your needs, eclipse instasearch plugin is a very useful plugin for search needs inside eclipse.
It is based on lucene. This is also available in eclipse marketplace.
It has extensive feature set.
Instantly shows search results
Shows a preview using relevant lines
Periodically updates the index
Matches partial words (e.g. case in CamelCase)
Opens and highlights matches in files
Searches JAR source attachments
Supports filtering by extension/project/working set
If you want to search for anything without telling Eclipse what it is, use ctrl+shift+L (QuickEclipseSearch). This is the quickest way.
You can also use 'file search' (press ctrl+H) and navigate into file search using left and right arrrows on the top right corner of your windows. Or type 'file search' in the 'Quick Access' window.
If you are looking for a specific method, package, field,type or constructor use JAVA search.
If you want search in a particular file then just press ctr+F and type whatever you want to search in that current file.
Read all the answers above but couldn't figure out the solution working for me. Finally gave a thought process keeping in mind all the solutions provided here and voila it worked for what I'm looking here. Thanks stackoverflow, this site is awesome.
Solution I worked out:
Goto Navigator window in eclipse, select the folder where you want to perform the search operation, now click Alt a & f (shortcut) which opens the file search window. Now select the option "Selected resources" in 'scope' section and hit 'Search' button.
In MAC I use, control+H (^H), it opens a window, where you can search for any text within all the files.