How to do remote projects over SFTP the right way?
This seems to be (or have been) an issue starting way back, so I apologize if this has been resolved or corrected or declared off-topic permanently. I'm first and foremost testing phpStorm to see if it can replace my current Komodo IDE. I've been using pyCharm and been reasonably happy with it, but I've been using Komodo IDE for quite some time, and I guess old habits die hard.
What I want to do is to create a project, that I associate with a remote server (using SFTP). I then want to be able to browse all folders on that remote server and edit/change/create any given file. So I'm not typically working with this in a "deployment scenario". I typically use editing sessions, where the IDE stores my recently open files in a given project. Once I'm "done" with a set of files, I close them, and may open other files, and so on.
It seems like this is still an issue in phpStorm in 2021, or am I missing something? I don't really want phpStorm to index the entire server, or even project root. There are thousands and thousands of files on the selected remote path. I realize I could probably mount this using sshfs or similar, but I've also seen notes about this voiding any support whatsoever from JetBrains :-)
It may come to that I simply keep Komodo IDE, but I do like Jetbrains' different IDE:s, so it'd be nice to be able to give it a run for its money so to speak.
-joho
请先登录再写评论。
Hi there,
Yes, you can use Remote Edit for over a year now: browse remote server ( (S)FTP(S) ), select the file and click "Edit remote file" (should be linked to Double Click action by default): IDE will download and open that file for editing (the file will be stored in a temp location, NOT in the project), then use Upload when done (just saving the file will NOT upload it back).
https://www.jetbrains.com/help/phpstorm/editing-individual-files-on-remote-hosts.html
Obviously, since other files will not be indexed you cannot expect any code completion for classes/functions from those remote-only files.
Thank you for getting back to me so quickly, and for sorting out the facts :-)
I guess this is some sort of hybrid variant of how Komodo IDE does it.For me, Komodo's way works better.
For what it's worth, I think it'd make sense if phpStorm supported some sort of mode where you can set a "Project root", but only have it index (not download) files and folders on-demand (i.e. when I actually click to expand a folder), and only download on demand.
If you have project set up then PhpStorm will NOT auto download anything for you, especially when you are browsing the remote host.
I guess you are talking about New Project wizard here, where once you select that your project code is on remote server then the IDE will download them for you.
If that's so: just create an empty local project and add Deployment entry later: no files will be downloaded unless you explicitly tell it to do that. The IDE is built around "local code first, remote is a copy" idea so it has auto-upload (e.g. on local file change) but not auto-download.
Just in case: the IDE can index only local files. If it's on remote only then in order to index it the IDE has to download them into the project and then index. It cannot just "download into temp, index and then remove but keep the index info".
Thank you, again. I might have to try that and see how it works for me.