How in PhpStorm in “Find in path” dialog to select search in the directory of the active file? - phpstorm

If there is a way in PhpStorm 2019.2.3 opening “Find in path” dialog to select search in the directory of the active file ?
MODIFIED :
When I start new session in my PHPStorm and
having active file in one of subdirectories : https://imgur.com/a/tQbhlI9
I open “Find in path” dialog and see : https://imgur.com/a/UZp5KmE
“In project” tab is active and in found files I see files found from all the project.
I open “Directory” tab and see error : https://imgur.com/a/e4rtCdH
Are there some options To Search In the current directory?
Is something wrong in config of my PhpStorm 2019.2.3 ?
Thanks!

To search in the directory of the current file, you need to take 3 steps:
Open the Project Navigation bar
Click the select opened file button on the project toolbar or press ALT+F1 followed by 1 (At least that's what the combination is on the Sublime Text Keymap)
Press Ctrl+Shift+S or go to Edit -> Find -> Find in Path (or select the parent folder of your file in the project toolbar and right click to select find in path)
Alternatively you can right click the file tab and copy the path to enter it in the directory option of find in files.

Related

PhpStorm Find all Instances in current remote file

I am trying to get a list of search results for a string in the current file which is opened from a remote host. CTRL F only highlights the instances in the doc but does not give me an easy overview. If I have a file downloaded to my project folder I can press CTRL SHIFT F for "find in path" and then CTRL ENTER to open the find window. complicated but better than nothing.
Is there a simple "find all in current file" command, disregarding whether its a project file or a remote file?
Click on All button on Find toolbar and it will list all found entries in a standard "Find Results" toolwindow.

How clear PhpStorm recently edited files list

This list opening in PhpStorm by Ctrl+E or Ctrl+Shift+E ("Recent files" or "Recently changed files").
But how I can clear this history list? Is it possible in PhpStorm 9?
Just use Del key in that popup window -- it will delete currently selected entry from that list.
It works with Recent Files (Ctrl + E) but does not affect Recently Edited Files (Ctrl + Shift + E). For this one you will have to edit config file directly:
close project in IDE/or whole IDE (otherwise IDE will overwrite those changes on exit)
navigate to PROJECT/.idea folder
open workaspace.xml in any plain text editor
find and delete whole <component name="IdeDocumentHistory"> XML node.
save changes

Go to file when file already open in other panes/windows open in Sublime 2

If I have several panes (groups) open and do CTRL+P (go to anything) and type the name of a file which is already open in another pane, Sublime will open this file in the pane I started Go to anything from. I want it to go to any of the other panes, where this file is already opened instead of opening a new instance of the file.
How can I achieve this?
There are a couple of packages/plugins that may be close to what you want:
GotoOpenFile, you can choose from a list of views in whole window or the active group:
https://sublime.wbond.net/packages/GotoOpenFile
or the newer Zen Tabs, which has some other useful file status as well as tab management
https://sublime.wbond.net/packages/Zen%20Tabs

Shortcut Key to copy full file path in JetBrains IDE (PhpStorm, PyCharm, WebStorm etc..)

Is there any Shortcut Key or Option to Copy the full file path on which you are working?
Like: /var/www/html/code/info.php or /code/info.php
Thanks
Right click on editor tab or on entry in Project View and choose "Copy path" action.
Alternatively: Edit | Copy Path (Ctrl + Shift + C here on Windows keymap). You can adjust the shortcuts in the Settings/Preferences | Keymap as needed.
If you need it to be relative to the project root -- use Copy Relative Path action instead.
Please note that this action is context dependant: when focus is on file (e.g. in Project View or some popup with files) it will be "Copy Relative Path" ... but when invoked inside the editor .. it will become "Copy Reference" (and will copy Class/Variable name etc).
UPDATE 2022-08-19:
Modern IDE versions have these commands under a single popup menu:
Invoked in the Project View context:
Invoked in the Editor context:
Another option is to use custom plugin that provides such actions. There are few that can do that and more (even if invoked right from the Editor).
It is strange, but in the latest version, JetBrains removed this option from the context menu (right-click on the file name tab) + removed from the Edit top menu.
So the alternative is to use triple-click on the shift + type copy path there.

How to open and save files

Is there a way to quickly open files in sublime text2?
At the moment I open files like this.
I open my terminal and enter
subl source/myproj/myfile.rs
Can I do this inside of sublime text2/3?
Also when I want to create a new file in source/myproj/ I usally press ctrl + n to create a new window and then I hit ctrl + s to save and name the file. The problem is when I hit ctrl + s my file system dialog opens and I have to use my mouse.
I think I saw someone using vim and he just could say source/myproj/mynewfile.rs and then the file would be created.
Is this possible in sublime text 2/3?
To quickly open a file in your current project, you can hit Ctrl+P and start writing the filename. This will sort through the files in your project and give you a little list, most likely the one you are looking for is pre selected, but if not, it is somewhere near the topmost options to select from, use arrow key down and highlight it, press enter and you just opened that file.
Another option to quickly create a file is using the AdvancedNewFile plugin.
When you hit Ctrl+n, it asks near the bottom of the window for a path and filename, once you enter it, it opens the new tab with the file already created, not an untitled file to later use system dialog to save to disk.