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

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

问题描述

我远程和现场使用 PhpStorm.我目前在两个位置都下载了项目并与部署的服务器同步.但是,我了解到 PhpStorm 能够直接编辑已部署的文件,这将消除每次更改位置时都要记住同步的麻烦.

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.

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

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

推荐答案

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

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

是的.仅举几例:

  • IDE 无法索引不在项目中的文件,因此无法为仅在远程文件上定义的类/函数/等提供任何代码完成帮助;
  • 真正的项目范围搜索是不可能的(因为它仅适用于本地文件).这意味着您可以查找/替换本地文件,但根本找不到任何仅限远程的匹配项;
  • 因为没有索引......任何类型的重构都只能应用于本地文件......这可能会导致(例如)类名仅在一半的地方发生变化;
  • 本地历史记录(简单的内置 VCS,可记住您在文件保存之间所做的所有编辑)不可用.

仅当您需要进行一些快速更改(例如修复错字;更改某些配置值)或不需要交叉引用(例如您确定具有此类名称的文件存在于那个位置;或类具有带有这些参数等的方法).同样的成功,您可以用更快的 Notepad++/Sublime 或任何其他支持 FTP/SFTP 的文本编辑器替换 PhpStorm IDE.

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天全站免登陆