热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如何在PhpStorm中检测到更改时刷新文件-HowtorefreshfilewhenchangesaredetectedinPhpStorm

MycolleagueandIareworkingonthesameprojectinPhpStormsharedinnetwork,andithappenstha

My colleague and I are working on the same project in PhpStorm shared in network, and it happens that we are editing the same Javascript file, however when I change the file, there is a delay for the update file on his computer and it's the same with me. Is there a way to make the PhpStorm update the file when it detects a change? Without this delay?

我和我的同事正在网络上的PhpStorm共享的同一个项目中工作,碰巧我们正在编辑同一个Javascript文件,但是当我修改文件时,他的电脑上的更新文件有延迟,我也一样。是否有一种方法可以让PhpStorm在检测到更改时更新文件?如果没有这种延迟?

2 个解决方案

#1


2  

Go to File>Synchronize to refresh the files in the project or Use the shortcut Ctrl + Alt + Y in windows and Cmd + Alt + Y in Mac.

enter image description here

进入文件>同步刷新项目中的文件,或者使用快捷键Ctrl + Alt + Y在windows和Cmd + Alt + Y在Mac。

#2


0  

Responsible for the delay you encounter is not PhpStorm but the network. Even on local networks, it takes some time (seconds) for changes to propagate to other computers. The reason in not in hardware but in the way the network sharing is implemented in software.

你遇到的延迟不是PhpStorm而是网络。即使是在本地网络上,也需要一些时间(秒)来改变传播到其他计算机。原因不在于硬件,而在于软件实现网络共享的方式。

The programs can subscribe to get notified by the OS about events on a specified file or directory. When an event happens, the programs on the local computer that subscribed are notified almost instantly. This is not possible when the files are on another computer; the changes on the remote drive are visible to local programs when the network sharing software on the two computers exchange information about what happened sync their last communication.

程序可以订阅,以获得操作系统关于指定文件或目录中的事件的通知。当事件发生时,本地计算机上订阅的程序几乎立即被通知。当文件在另一台计算机上时,这是不可能的;当两台计算机上的网络共享软件交换信息时,远程驱动器上的变化对本地程序是可见的。

Because network communication takes time and resources, the sharing programs usually publish their information in batches. If a file changes it waits some time (let's say half of second), maybe some other change happens and it can publish both in a single batch. If nothing happens then it decides it's the time to inform the other computers in the network about the changes.

由于网络通信需要时间和资源,共享程序通常批量发布它们的信息。如果一个文件更改了,它将等待一段时间(假设是半秒),可能会发生其他更改,它可以在一个批中同时发布这两个更改。如果什么都没有发生,那么它决定是时候通知网络中的其他计算机关于这些变化。

It's also possible that PhpStorm queries the file status from time to time. Again, because of network overload it cannot do it continuously; it would be a waste of processing time and resources.

PhpStorm也可能不时地查询文件状态。同样,由于网络过载,它不能连续地做;这将浪费处理时间和资源。

I think using your current setup this is the best you can get.

我认为使用你目前的设置这是你能得到的最好的。


推荐阅读
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • 本文详细介绍如何使用Python进行配置文件的读写操作,涵盖常见的配置文件格式(如INI、JSON、TOML和YAML),并提供具体的代码示例。 ... [详细]
  • DNN Community 和 Professional 版本的主要差异
    本文详细解析了 DotNetNuke (DNN) 的两种主要版本:Community 和 Professional。通过对比两者的功能和附加组件,帮助用户选择最适合其需求的版本。 ... [详细]
  • 获取计算机硬盘序列号的方法与实现
    本文介绍了如何通过编程方法获取计算机硬盘的唯一标识符(序列号),并提供了详细的代码示例和解释。此外,还涵盖了如何使用这些信息进行身份验证或注册保护。 ... [详细]
  • 优化ListView性能
    本文深入探讨了如何通过多种技术手段优化ListView的性能,包括视图复用、ViewHolder模式、分批加载数据、图片优化及内存管理等。这些方法能够显著提升应用的响应速度和用户体验。 ... [详细]
  • 本文基于刘洪波老师的《英文词根词缀精讲》,深入探讨了多个重要词根词缀的起源及其相关词汇,帮助读者更好地理解和记忆英语单词。 ... [详细]
  • 本文介绍了如何使用JQuery实现省市二级联动和表单验证。首先,通过change事件监听用户选择的省份,并动态加载对应的城市列表。其次,详细讲解了使用Validation插件进行表单验证的方法,包括内置规则、自定义规则及实时验证功能。 ... [详细]
  • c# – UWP:BrightnessOverride StartOverride逻辑 ... [详细]
  • 使用 Azure Service Principal 和 Microsoft Graph API 获取 AAD 用户列表
    本文介绍了一段通用代码示例,该代码不仅能够操作 Azure Active Directory (AAD),还可以通过 Azure Service Principal 的授权访问和管理 Azure 订阅资源。Azure 的架构可以分为两个层级:AAD 和 Subscription。 ... [详细]
  • 前言--页数多了以后需要指定到某一页(只做了功能,样式没有细调)html ... [详细]
  • 本文详细介绍了Akka中的BackoffSupervisor机制,探讨其在处理持久化失败和Actor重启时的应用。通过具体示例,展示了如何配置和使用BackoffSupervisor以实现更细粒度的异常处理。 ... [详细]
  • Android 渐变圆环加载控件实现
    本文介绍了如何在 Android 中创建一个自定义的渐变圆环加载控件,该控件已在多个知名应用中使用。我们将详细探讨其工作原理和实现方法。 ... [详细]
  • 离线环境下的Python及其第三方库安装指南
    在项目开发中,有时会遇到电脑只能连接内网或完全无法联网的情况。本文将详细介绍如何在这种环境下安装Python及其所需的第三方库,确保开发工作的顺利进行。 ... [详细]
  • 在维护公司项目时,发现按下手机的某个物理按键后会激活相应的服务,并在屏幕上模拟点击特定坐标点。本文详细介绍了如何使用ADB Shell Input命令来模拟各种输入事件,包括滑动、按键和点击等。 ... [详细]
  • 本文详细介绍了MicroATX(也称Mini ATX)和MATX主板规格,探讨了它们的结构特点、应用场景及对电脑系统成本和性能的影响。同时,文章还涵盖了相关操作系统的实用技巧,如蓝牙设备图标删除、磁盘管理等。 ... [详细]
author-avatar
常德锦江-余欢
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有