I am switching from Vim to PHPStorm. In Vim I had a plugin called CtrlP which could be used to search for files with its path using fuzzy logic.
For example, searching for the string "defaorderwid
"
Would suggest the file "themes/default/views/order/widget.php"
(Sublime also has this functionality too ("Goto Anything"), available via Ctrl+P.)
How can I do something similar in PHPStorm? I am aware of Ctrl+Shift+N search, but it searches only names of files without paths.
It is important for me because in current project I have many files named "widget.php" in different folders.
From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . PhpStorm places the highlighted string into the search field.
Search everywhereFrom the main menu, select Navigate | Search Everywhere or press Shift twice to open the search window. By default, PhpStorm displays the list of recent files.
Add a mnemonic line bookmarkIn the editor, place the caret at a line of code and press Ctrl+F11 . Alternatively, right-click the gutter next to the line of code that you want to bookmark and select Add Mnemonic Bookmark.
Press Shift, Shift (twice). Then enter widget.php
and prepend the folder, or parts of it. Works for me.
They call it "Search Everywhere", or "Double-Shift" feature.
If you want to use abbreviations, you can CamelCase
or or CamelHumps
or SnakeCase
your search, or use Wildcards (*
). Read here.
if you have files like:
/buildings/users/create.blade.php
/rooms/users/create.blade.php
/parks/users/create.blade.php
you can search like that:
1. double press SHIFT
2. type: buil/creat (first letters of folder and file)
3. PHPStorm will find: buildings/users/create.blade.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With