RubyMine search project for file by path - rubymine

In SublimeText 2 I can do: cmd + t
And then type either file names or folder names and the results displayed
are files that either match files that match the term i'm searching for for files that are in a subfolder of the term i'm searching for, for example if I had directory structure like so:
/
/models
/users
/orders
/products
/views
/users
edit.rb
add.rb
/orders
edit.rb
add.rb
I could do cmd + t
And the type "orders" and
the only two options that would show up would be
the /orders/edit.rb and /orders/add.rb file which i could key navigate down or type add more to the search term "orders edit" and the only option would be "/orders/edit.rb"
How can i get this same functionality in RubyMine

Use Navigate | File, you can type the file name and directory name fragments, like or/ed, use the slash as the separator. Middle matching is also supported.
More details available in help.

Press shift twice.
Search for Anything with Search Everywhere in IntelliJ IDEA
http://mrhaki.blogspot.ca/2014/02/search-for-anything-with-search.html

Related

How can I list all occurrences of a search term in one specific file in VS Code?

In VS Code I can find all occurrences of a search term in all project files via the main Search ("Find in Files" -- Ctrl+Shift+F).
This is a nice list of occurrences grouped by filename. However when I have many files in my project, but I am interested only in the occurrences for one file this list is pretty unwieldy.
How can I list all occurrences of a search term in only one specific file?
P.S. I know how to jump inside a file from occurrence to occurrence ("Find" -- Ctrl+f and then Enter), but here I would like a list of occurrences.
To get a list of search matches for a specific file, use the search pane's file filter mechanism and in the "files to include" field, enter the relative path to the file that you want to search in. To see the "files to include" field, you need to expand the little menu (see the "..." button) under the search field. Then just enter a search query like you normally would.

Is it possible to set open resource (ctrl-shift-R) to search full path by default in Eclipse IDE?

When using editor like atom or sublime, when trying to open resource by hot key (e.g. ctrl-P in atom), the default behavior is to search in full path. For example, when I press ctrl-P and type controller/base_controller, I will see controller/base_controller.php in the search result.
However, in Eclipse, when I press ctrl-shift_R and type controller/base_controller I will get nothing. I will need to type base_controller (if the file name is not repeating much) or *controller/base_controller to have controller/base_controller.php in the search result.
When most OS prohibit using slash ('/') in file name, I would expect Eclipse should at least know it is a full path search when I input slash. Anyway, is there a way I can set the "open resource" search to be full path search by default in Eclipse IDE?
In Eclipse a full path starts with /.
So in your example, you have to type /controller/base_controller to match base_controller.php in the project controller.
Alternatively, you can select the project or folder and use the File Search (Ctrl+H) leaving the Containing text field empty, with a file pattern and choosing the selected project or folder as scope.

How to find folder in VS Code?

I have a project with a lot of files and folders. There are no problems with finding files. They can be found with Ctrl-P. But there are many folders in which files with the same name are made. Therefore, it is easier to search for a file by the name of the folder in which it is located. How in VS Code to search for folders in the current open project?
For example, I have the following project structure:
A/
main.js
B/
main.js
...
Z/
main.js
The file main.js from the folder P will be easier to find by the folder name.
While using Ctrl-P, you can type the full path of the file, so if i have two files named bar you can search on Ctrl-P with
"foo/bar" or with "qux/bar"
Vscode uses fuzzy search (like so many others), so you don't have to actually type the whole thing.
There is no way, to my knowledge and research, to find and be directed to a specific directory.
You can simply select a folder on the explorer and tape some filter keywords.
Recently, vscode added a shortcut, if you are using a recent release just typing won't work, first tape ctrl + f.
Ctrl + Shift + E
and start typing. You'll see your search on the top right corner of file explorer.
By default it does not filter by result but your focus will jumps to the first one. From there you can Enter to open it.
If you want to show only results containing the string of search : click on filter icon next to your search (state will be remembered).
Echap
to exit/remove search
or
Ctrl + Shift + E
again to switch back focus to last place you were typing.
This VSCode extension does exactly what you're asking for.
https://marketplace.visualstudio.com/items?itemName=rwu823.open-folder
I found a way to search through subfolders. Click on a folder you wish to search, than / and start typing for a name of subfolder
It's simple. Just open the parent folder of your folder in VSCode. Then right-click on the folder you want to find subfolder in and choose "Find in folder"

Search for a string in a filename in Eclipse

File search in Eclipse searches for text in files, but not for text in the file names. For example I would like a list of all files in my projects that are named test.py.
Is this possible in Eclipse?
Try Search > File Search. Left "Containing text" empty and enter your pattern (e.g. *est* in "File name patterns". Set scope to e.g. "Workspace"

Eclipse searching files in specific package

I am attempting to strip out my Log.i Log.d etc code in eclipse. I have used them liberally. I can find them by control+h and using the File Search tab. Once I can filter the results to a certain package I plan on doing a replace with a blank string.
I check the Regular Expression checkbox.
In the Containing text: field I use Log\..*;
This gets every single Log line of code in the workspace (At least I think workspace, because there is currently 1 project in the workspace)
How can I get this search to only search within a certain package (ie com.example.so.is.super.cool)
I assume this is in the File name patterns field and I have attempted:
.*super.*
*super*
super
Please let me know if there is a pattern I can enter in File name patterns that narrows the search down for me.
Here's how:
Select the package in Package Explorer
On the Search > File Search panel: Specify regular expression, set Scope to "Selected resources"
Press Search