PhpStorm - 直接编辑部署文件与下载和同步的优点 [英] PhpStorm - Advantages of Editing Deployed Files Directly vs Downloading and Syncing

查看:279
本文介绍了PhpStorm - 直接编辑部署文件与下载和同步的优点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在远程和现场使用PhpStorm。我目前在两个位置都下载了项目,并与部署的服务器同步。但是,我了解到,PhpStorm可以直接编辑部署的文件,这样可以消除每次更改位置时记住同步的头痛。



如果我直接编辑文件在部署的服务器上,是否会丢失任何PhpStorm功能?

解决方案


如果我直接编辑文件部署的服务器,是否会丢失任何PhpStorm功能?


是的。仅举几例:




  • IDE无法对不在项目中的文件进行索引,因此无法为类/功能/等等,仅在远程文件上定义;

  • 无法进行真正的项目范围搜索(因为它仅适用于本地文件)。这意味着您可能会在本地文件中找到/替换,但是只会找不到任何只有远程匹配的匹配项;

  • 因为没有索引...任何类型的重构只能是仅适用于本地文件..这可能导致(例如)类名称仅在一半地方更改的事实;

  • 本地历史记录(简单的内置VCS,记住所有您的文件保存之间的所有编辑)不可用。



只有在需要进行一些快速更改时,远程编辑才可实用(例如修复打字错误,更改一些配置值)或者不需要交叉引用(例如,您确定知道该位置的文件存在于该位置;或类具有这些参数等的方法)。同样的成功,您可以用更快的记事本++ / Sublime或任何其他支持FTP / SFTP的文本编辑器来取代PhpStorm IDE。


I use PhpStorm remotely and on-site. I currently have the project downloaded at both locations and sync with the deployed server. I learned, however, that PhpStorm has the capability to edit deployed files directly which would eliminate the headache of remembering to sync every time I change locations.

If I edit files directly on the deployed server, would any PhpStorm functionality be lost?

解决方案

If I edit files directly on the deployed server, would any PhpStorm functionality be lost?

Yes. To name a few:

  • IDE cannot index files that are not in the project and therefore cannot provide any code completion help for classes/functions/etc that defined on remote only files;
  • True project-wide search is not possible (as it works with local files only). This means that you may do find/replace on local files but any remote-only matches will simply not be found;
  • Because there is no indexing ... any sort of refactoring can only be applied to local files only .. which may lead to the fact that (for example) class name is changed only in half of the places;
  • Local History (simple built-in VCS which remembers all your edits between file saves) is not available.

Remote-only editing can be practical only if you need to make some quick changes (e.g. fix typo; change some config value) or where no cross-referencing is required (e.g. you know for sure that file with such name exists at that location; or class has such method with those parameters etc). With the same success you can replace PhpStorm IDE with much faster Notepad++/Sublime or any other text editor with FTP/SFTP support.

这篇关于PhpStorm - 直接编辑部署文件与下载和同步的优点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆