Phan Vũ
Phan Vũ

Reputation: 47

PhpStorm How to open the folder containing files on remote host

I'm so tired of opening each folder to get where I need to go

Go to Folder Local: Ctrl + Shift + N -> Open File > Select Opened File

enter image description here

Go to Folder Remote Host: ???? Is there a way to find the folder containing the file in the fastest way on the remote host?

Upvotes: 0

Views: 925

Answers (1)

LazyOne
LazyOne

Reputation: 165118

Go to Folder Remote Host: ???? Is there a way to find the folder containing the file in the fastest way on the remote host?

If you are asking: "I have some folder name and want to type/paste it somewhere and the IDE should select that folder in the Remote Host panel"... then the answer is No.


But if you want to navigate from a local location to a corresponding remote place -- then Yes.

This works for the currently opened/active file in the Editor .. or any folder or file currently selected in the Project View panel (should also work from other places where files are listed).

It's a 2-step shortcut... and the first part is already there, on your screenshot:

enter image description here

Alt+F1 (which is a shortcut for Navigate | Select In...). Then just select Remote Host (3) in the popup. So the full shortcut is Alt+F1, 3.

For example: me invoking the first part of the shortcut on a themes folder selected in the Project View panel.

enter image description here

NOTES:

  1. It is required that you have a Deployment entry configured in your IDE and it should be selected as Default. The "Remote Host" option will be unavailable if you have no Default deployment entry.

  2. Obviously, the deployment entry must be configured properly (the path mappings). I mean -- you should be able to upload/download files with no issues.

  3. If there is no active connection to the remote host yet, then the action will fail mid way (will stop after showing the Remote Host panel and establishing the connection). In such a case just repeat the shortcut again.

    The action will work just fine if the Remote Host panel is already visible and there is an active connection to the remote host.

A few Help Pages links:

Upvotes: 2

Related Questions