简体   繁体   English

PhpStorm 如何在远程主机上打开包含文件的文件夹

[英]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转到本地文件夹:Ctrl + Shift + N -> 打开文件> 选择打开的文件

在此处输入图像描述

Go to Folder Remote Host: ????转到文件夹远程主机:???? Is there a way to find the folder containing the file in the fastest way on the remote host?有没有办法在远程主机上以最快的方式找到包含文件的文件夹?

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.如果您问:“我有一些文件夹名称并想在某处键入/粘贴它,IDE 应该在远程主机面板中选择该文件夹”......那么答案是否定的。


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:这是一个两步快捷方式......第一部分已经存在,在您的屏幕截图中:

在此处输入图像描述

Alt+F1 (which is a shortcut for Navigate | Select In... ). Alt+F1 (这是Navigate | Select In...的快捷方式)。 Then just select Remote Host ( 3 ) in the popup.然后只需在弹出窗口中选择Remote Host ( 3 )。 So the full shortcut is Alt+F1 , 3 .所以完整的快捷键是Alt+F1 , 3

For example: me invoking the first part of the shortcut on a themes folder selected in the Project View panel.例如:我在项目视图面板中选择的themes文件夹上调用快捷方式的第一部分。

在此处输入图像描述

NOTES:笔记:

  1. It is required that you have a Deployment entry configured in your IDE and it should be selected as Default .需要在 IDE 中配置一个 Deployment 条目,并且应将其选为 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:一些帮助页面链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM