Whats the keyboard shortcut to upload the current file I'm working on?

Hello,

PHPstorm is great,

Whats the keyboard shourtcut to upload the current file I'm working on?

I don't want to use automatic upload in this case,

Thanks

2
8 comments

Hi there,

There is none. You can assign any shortcut you wish yourself: Settings | Keymap | Plugins | Remote Hosts Access | Upload to Default Server

6

Every day I learn something amazing about PHPStorm. Me very happy.

0

Thank you, it works!

0

Interesting that also apply to pycharm

0

When I try to setup the shortcut, it doesn't work. It creates a separate copy like "Windows copy 1 or 2", and doesn't change the setting outside of it.





0

@Sindhujit Ganguly

When I try to setup the shortcut, it doesn't work. It creates a separate copy like "Windows copy 1 or 2", and doesn't change the setting outside of it.

That's because you are doing it for a wrong action.

  • "Upload to Default Server" is for files that are part of the project.
  • While your 2nd screenshot shows that you are working with a remote file (a file opened directly on a remote server). Physically, this file is stored locally in some temp location while you are editing it, but it's not part of the local project files. For whatever reason (there must be some) it's done as a separate/different action: "Upload Current Remote File" (just as the tooltip says).

0

As you can see in my screenshot, the shortcut for "Upload Current Remote File" is also Ctrl+S. I am thinking it has something to do with creating a separate copy "Windows copy 2", when actually "Windows" is what gets actually used. Not sure how to fix that ? Also while changing the default I see a message Ctrl+S is already used and its asking me whether I want to replace the existing one which is to just save, and I click on "Keep".  Not sure if that is causing any issues.

0

@Sindhujit Ganguly

As you can see in my screenshot, the shortcut for "Upload Current Remote File" is also Ctrl+S.

Thanks. I see it now. Somehow I have completely missed that moment in the first place (which makes my previous comment redundant).

 

I am thinking it has something to do with creating a separate copy "Windows copy 2", when actually "Windows" is what gets actually used. Not sure how to fix that ?

It does not matter how many copies of a keymap you have -- only the selected one is used.

 

Also while changing the default I see a message Ctrl+S is already used and its asking me whether I want to replace the existing one which is to just save, and I click on "Keep".  Not sure if that is causing any issues.

It will. By default Ctrl+S is assigned to Save All action.

If more than one action in the same applicable context has the same shortcut, then the IDE cannot guarantee which action will be executed. But it will be only one action called anyway. So in your case it seems that the Upload action most likely is not getting executed at all.

If you want to use Ctrl+S for Upload action(s), make sure to remove that shortcut from other actions. HINT: there is a button next to the local search field (visible on your and my screenshots) -- you can use it to find all actions that have specific shortcut assigned.

 

NOW THE QUESTION: since Ctrl+S is a default shortcut for Save All action, and you want to use it for Upload while still keeping it assigned to the original action -- what was that for? As I understand you want to have Save the file and Upload under one shortcut (so it does both things)?

If that's the case: better use Automatic deployment, there is an option for that (Upload on Save). Sadly this would not work with Remote Edit files (as it's a remote-only file in IDE eyes: no local copy in the project).

NOTE: the IDE will save the file for you if you invoke Upload action on such a file.

0

Please sign in to leave a comment.