有没有一种方法可以在PhpStorm中仅保存一个文件? [英] Is there a way to save just one file in PhpStorm?

查看:140
本文介绍了有没有一种方法可以在PhpStorm中仅保存一个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的传统工作流程必须与PHPStorm的默认工作流程有所不同.我经常同时处理多个文件,并希望在完成一个文件后只保存其中一个文件,而不保存已修改的其他文件.

我设法关闭了自动保存功能.现在,当我编辑文件时,我在已编辑的文件上得到了星星,直到我点击保存",它们才会保持原来的状态.到目前为止一切顺利.

但是,当按CTRL-S保存时,希望它保存我正在查看的一个文件,这样我就可以回到带有星号的文件上也将它们擦掉,它也可以保存所有其他文件. /p>

我希望有某种方法可以更改此行为或进行一些设置,以允许我一次只保存一个文件!

解决方案

是的,您可以 ..但这并不会带来太大变化(例如,如果您更改设置或运行/重新运行某些内容,无论如何,所有文件都会自动保存).最终(在适应了几周或一个月之后),您将习惯这种行为,并且很可能会喜欢它(是的,这意味着要稍微改变工作习惯,这对于某些人/某些人来说很难做到(需要时间))情况).

无论如何 ...启用保存单个文件"功能:

  1. Settings | Keymap
  2. 在该屏幕上的搜索框中,键入"save"
  3. 您要执行的操作称为其他|保存文档"
  4. 分配所需的任何快捷方式.

PS 此操作不会要求确认(行为与标准保存相同).

P.P.S. 从仅PhpStorm v7起可以执行此操作.

My traditional workflow must be a little different to the PHPStorm default. I often work on multiple files at the same time and want to be able to save just one file when I've finished with it, without saving the others that I've modified.

I've managed to turn off the auto-save feature. Now, when I edit files I get stars on the ones I've edited and they stay like that until I hit 'save'. So far so good.

But when press CTRL-S to save, expecting it to save the one file I'm looking at so I can go back to the ones with asterisks to polish them off too, it also saves ALL the other files too.

I hope there's some way to change this behaviour or set up something to allow me to save just one file at a time!

解决方案

Yes, you can .. but that still does not change a lot (e.g if you change your settings, or run/re-run something -- all files will be saved automatically anyway). Eventually (after few weeks or month of adaptation) you will get used to this behaviour and quite likely will love it (yes, this means changing working habits a bit, which is quite hard to do (requires time) for some people/in some cases).

Anyway ... to enable "save single file" functionality:

  1. Settings | Keymap
  2. On that screen, in search box type "save"
  3. The action you are after is called "Other | Save Document"
  4. Assign whatever shortcut you want.

P.S. This action will NOT ask for confirmation (same behaviour as standard save does).

P.P.S. This action is available since PhpStorm v7 ONLY.

这篇关于有没有一种方法可以在PhpStorm中仅保存一个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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