idea实时写文件底层是什么技术?

idea不需要我们经常按保存快捷键,我们在界面发动它会实时写到文件里,大家知道,我们写代码的时候键盘按得很快,可能一秒内会有多个字符输入改变,idea不会每按一次就整个文件写一次吧?

阅读 2.2k
1 个回答

并不是实时的,只是感觉像是,实际上实在一些事件触发后,才会进行自动保存。

IntelliJ IDEA automatically saves changes that you make in your files. Saving is triggered by various events, such as compiling, running, debugging, performing version control operations, closing a file or a project, or quitting the IDE. Saving files can be also triggered by third-party plugins.
Most of the events that trigger auto-save are predefined and cannot be configured, but you can be sure that changes will not be lost and you can find all of them in local history.

File | Settings | Editor | General | Editor Tabs 下有一个 Mark modified (*) 的选项,当问及修改后,就会在标签上展示一个特别的图标,表示这个文件还没有被保存。

image.png

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进