Can't deploy just the file I'm working on with shortcut?

I use Ctrl+S to deploy files I want to test (Eclipse shortcuts), but it appears to deploy ALL modified files instead of the one I'm just working on.

This has been problematic sometimes because I wasn't ready for some changes in other files to be tested.

I looked in Settings and found that it says "Upload changed files automatically to the default server" (I actually wish I could not have it always be the default server), which means I can't set it there to only upload the file I'm working on.

Any solution to this?!

Maybe Eclipse does what I need.

3 comments
Comment actions Permalink

Hi there,

"Tools | Deployment | Upload to XXX" or similar via context menu for Editor/Editor Tab/Project View. It will save current file (or possibly all modified files, not sure) before uploading.

I looked in Settings and found that it says "Upload changed files automatically to the default server"

So .. do you have that option enabled or disabled?

If enabled -- you will have to disable and manually upload files (see above) otherwise IDE will upload *all* modified files automatically (that's the whole point of that option -- to keep remote in sync with local with minimal movements from your side).

P.S.
You may try using "Save Document" action instead of just "Save" in such situation (by default has no shortcut). It will save current file only -- possibly it will work fine with your automatic upload.

0
Comment actions Permalink

You can assign preferred shortcut to 'Upload to default server' action in Settings/Keymap/Main menu/Tools/Deployment and then use this shortcut to upload current file.

0
Comment actions Permalink

If the option is disabled obviously it's not going to have the described effect (making this post completely irrelevant); the effect is that it will upload files (plural), but it doesn't state whether it's opened files or not (files with tabs in the view), so I guess I have to take it literal in that it will upload all files in the project directory that have been changed, which is not the effect I want. I merely want the file I hit Ctrl+S on to upload that file.

When I go to keymap settings, Ctrl+S is mapped to "Save All", which is different than Eclipse's "Save All" shortcut (Ctrl+Shift+S), so that shortcut doesn't get mapped correctly from Eclipse when I specified to use Eclipse keymappings (not the first shortcut this has happened to; look up how PHPStorm maps Ctrl+F find to be actually Replace).

What I'm looking for is to have Ctrl+S just upload the file I'm currently focused on (the file immediately in view and the tab highlighted), but I'm not seeing that option anywhere in PHPStorm, and the Upload checkbox doesn't seem like it was built to work with that option anyways. I do see "Save Document" (I had to search for "Save" as "Ctrl+S" shows no results even though it's there) but I don't know exactly what that's going to do.

The added problem is that if all changed files are being uploaded, I don't get a notice if there is a merge difference or conflict, I'm guessing it just blatantly overwrites someone else's changes even if they're just trying to test something (which is the only reason why we upload).

0

Please sign in to leave a comment.