问题
I'm trying to switch to using the SFTP package for Sublime Text 2 as my default FTP client, as it looks rather promising with regards to workflow improvement -- much faster than using a 3rd party FTP client.
I was trying to browse a remote server, and it seems like I only have two options: either sync the entire remote location to a local folder, or browse it via the SFTP/FTP > Browse Server menu item, which brings up one of those file browsing bars. My situation concerns a large remote location (inconvenient to download everything) on which I would like to edit files that are quite spread-out (inconvenient to navigate with that file browsing bar).
What I'm trying to achieve is to be able to browse the server in the side-bar, like the behaviour that occurs when browsing a local folder, but without actually having to download every single file on the remote location. Just the directory listing should be sufficient information to achieve this. Then, upon trying to open a file from the sidebar that hasn't been downloaded yet, it could go ahead and download that specific file.
Is this some sort of option I have not yet discovered? Where can I configure this behaviour? What is your FTP workflow when it comes to editing multiple files on a large remote location?
回答1:
Mount the remote directory using SSHFS and then edit with ST2, there.
SSHFS:
This is a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there's nothing to do. On the client side mounting the filesystem is as easy as logging into the server with ssh.
Example:
sshfs user@host.com:/server/path /local/path
then
subl /local/path
来源:https://stackoverflow.com/questions/17085084/sublime-text-2-sftp-browsing-remote-in-sidebar