Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to save just one file in PhpStorm?

Tags:

phpstorm

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!

like image 675
caponica Avatar asked Oct 02 '13 21:10

caponica


1 Answers

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.

enter image description here

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.

like image 168
LazyOne Avatar answered Sep 20 '22 16:09

LazyOne