Visual Studio Code Search All Files - visual-studio-code

For example, get a php function named "example". How do I find out what other files I use this function for? I just want to search the files in the workspace.

Click the magnifying glass on the left side, put in the term, and press Enter / Return.
(Hit the little 3 dots to include/exclude files.)
Click the arrow to the left of the search box, and then you can do Search and Replace in files.
You can also find the functions specifically, as outlined here:
https://code.visualstudio.com/api/language-extensions/programmatic-language-features#find-all-references-to-a-symbol

Related

How to, inside Visual Studio Code, to search for files with a certain extension containing a certain text

I know that it is possible to search files by their contents by clicking at the hourglass on the left side; I also know that it is possible to search for files by their name by using Ctrl+p or Ctrl+e.
The problem is: I need to do both. I need to, for example, search for some specific text, but only inside '*.ts' files.
Is there a way to do this inside Visual Studio Code?
There is a button under regex in global search: "Toggle Search Details" (ellipsis)

Is there a "Find in Files" shortcut in Eclipse?

Is there a "Find in Files" shortcut in Eclipse, as there is in Visual Studio (Ctrl+Shift+F)?
I have looked in these two lists:
Eclipse Shortcuts
"Show All Shortcuts" shortcut: Ctrl+Shift+L.
Thanks.
select workspace and press Ctrl-H
Which dialog is selected, depends on which file type is selected in the Project Explorer view. For example, if you selected a .js file and press Ctrl-H, it will bring up the dialog with the "Javascript Search" tab selected. If you want to search all files, you can press Ctrl-F7 to select the Project Explorer view, use arrow keys to select a folder above your files, then press Ctrl-H (or select a file, whose type doesn't trigger a custom dialog tab).
Thanks to the other two solutions, but here is the complete answer I was looking for, which addresses how I search all the text within the files, not just types, methods, packages, constructors, and fields:
Ctrl+H to open the "Search" dialog box
"File Search" tab, if it does not appear, expand the window or use the left/right arrows
type in the text to search for
Use "*.java", in my case since I am coding in Java, to search just these files
Click "Search"
If you are using only the File Search, you can Disable all other Searches in the Search Panel (Customize... lower left Corner). Then you have the File Search everytime you Press Ctrl+H
Ctrl+H to bring up the search box
Click 'Customize' in the lower left
Checkmark 'Remember last used page'
Click OK.
Select the file search tab and do a search
If you want to use the type-specific search (Java, Javascript ...etc) you can use Ctrl+H, which opens the search dialog, then click the Search button.
If you simply want to search for all text occurrences in the whole the workspace click the word (or select the text) you want to search then hit Ctrl+Alt+G. You will directly get all the found occurrences without even using a dialog box.
I find Ctrl+Alt+G is the best solution because it shows the variable name in different by related files (e.g. Java and XML, or Javascript and HTML) while still having the type-specific search feature available through Ctrl+H
You can rebind the Ctrl+Alt+G to finding text in a project or a working set instead of the whole workspace if that's more appealing to you.
Yes, there is shortcuts for searching Eclipse, these shortcuts are very useful when we search for particular html, jsp , xml, java, properties ,class, jar,search file with keywords.
Ctrl+H is used open Tag, in that you can select type of file Remote Search, File search, git search, java search, javascript search , etc
Ctrl+Shift+R is used to search all files in the current project
Ctrl+Shift+T is used to search all files in the workspace
press Ctrl + H . Then choose "File Search" tab.
additional search options
search for resources press Ctrl + Shift + R
search for Java types press Ctrl + Shift + T
Source: Eclipse: Default to "File Search" Tab in Search Dialog
Go to your key bindings Windows > Preferences > General > Keys
Unbind the Shorcut "Ctrl+H" for the "Open Search Dialog"
Filter/Search for "File Search" and use the "Ctrl+H" here instead.
I believe adding plug-ins power your needs.
If you install Plug-in named InstaSearch it makes your searching faster inside current active working projects.
It shows the result as you type.
http://marketplace.eclipse.org/content/instasearch#.VIp-_5_PGPQ
As pointed out, CTRL + H opens the Search dialog.
Since I use only Find in Files (and set File name patterns when needed), I clicked on Customize... button on the bottom of the Search dialog. It opens Search Page Selection dialog, where I turned off all other options.
You can also click on Remember last used page in the same dialog.
Ctrl+Alt+F (Find Text in Project -Customized Key)
Note - Ctrl+Alt+G is for Find text in a workspace, not in a project
How to customize this Key
Window->Preferance->General->Keys-> Search for 'Find Text in Project'->Type 'Ctrl+Alt+F' in binding ->Apply
Note - this will be helpful if the developer is working on multiple project simultaneously.

Xcode 4 anything like right click to find in project?

In Xcode 3, I could right click on some text in my code, select find in project, and it would.
Is there anything like that in Xcode 4, where I can search for something without typing it in?
EDIT: to clarify, my concern is to avoid having to enter whatever I am searching for.
In other words, suppose I have methods called
methodWithReallyLongNameVersionA
and
methodWithReallyLongNameVersionB
It would be nice to be able to search for the first one via a right click search, without having to copy and paste or to type the whole thing in. This was possible in XCode 3.
I created a custom find scope and then used that find scope to search all within a project folder.
Create find scope as follows:
In Navigator selector bar click the magnifying glass to bring up search navigator
click the magnifying glass in the search text box and select 'show find options'
clock 'Find in' list and select custom
Create your new find scope in the dialog and set it to your project top level folder
Use this find scope in future searches.
Command + Shift + F will search your workspace.
At the time I asked this question, the answer was "no." However, Apple has now restored this functionality. Right click on the text in question, then select "find selected text in workspace" from the drop-down menu.

Search and Replace Entire Project (Netbeans)

Is there a way to do a project wide search and replace in netbeans? It seems like there should be, but I can not find any information on it.
Thanks
Under the Edit menu you should find a menu item for Replace in Projects...
If you click on the project in the projects pane.
Then press and hold Ctrl+Shift+H
A find and replace window will come up where you can specify what you would like to find and what to replace it with. You can use regular expressions and then after you search you can walk through all the results in the different files that are returned.
Go to Edit Menu -> you will find Find in Projects and Replace in Projects Option:
Shorcuts:
Ctrl+Shift+F for Find in whole project.
Ctrl+Shift+H for Replace in whole project.
You have to make "Replace in Projects" search as offered by NetBeans, and operate in search results windows further on. There is a "replace" button in the icons strip on the left of the search windows; select all search results (or just some of them you feel appropriate) and click that icon.
You might have to wait a while if there are many files you are working with.
If you need to find something and replace in the open file, you can do this:
Go to Edit Menu -> you will find Replace and below the editor will appear Incremental Search Sidebar where you can type what you need to find and replace.
Shorcuts:
Ctrl+H for Find what and Replace with in the open file.

Zend Studio for Eclispse Expand All feature

is there a way to select a folder and somehow expand all the child folders of the selected folder? It would be very useful.
The issue that I imagine is that because in Zend Studio php files are expandable also so they can show their classes namespaces methods and etc if there is a way to expand a folder and all its subfolders it shouldn't expand php files too.
Thanks in advance :)
In the project view, this feature does not exists.
However, you can right click on your top folder then click "search". This will open a search window. Simply press the "search" button without any search field entered and another window will appear with the results. In this window, you have a small "expand all" button in the top corner.
You can also right click on your top folder in that window and the "expand all" option will be displayed there too.