One of the most common requests from users and potential users is to be able to work on a remote server in a way that the files and folders appear in the sidebar. Below is information about the proposed Sublime Text sidebar API, along with a couple of current solutions. Of the two current solutions, each one has pros and cons, so be sure to check out both.
If your remote editing needs are few and far between, the Server Workflow might be the right answer for you. If you need to work with lots of remote files, you’ll probably want to read on.
Currently I have a request into the developer of Sublime Text (Jon Skinner) to add a sidebar API so that it will be possible to view remote files and folders in the sidebar. However, even if/when this does become possible, it will not be possible to use Goto File and Search in Folder with this because of the performance characteristics of the FTP and SFTP protocols. Sublime Text is fast because it caches information in memory and uses filesystem notifications of your OS to learn about file changes.
The current solution that is available to work on remote files involves creating a local copy of them. However, the local files are basically used as a facade for Sublime Text to perform standard file opertions such as the Goto commands. By using a number of features of Sublime SFTP, the local files will be automatically replaced with remote files when viewing and editing them.
In order for this process to work, you’ll need to create a local folder to store the files in, and then configure Sublime SFTP with the specific options to make remote editing (mostly) seamless.
Add the folder to Sublime Text.
Tip: save the opened folder as a project through the Project menu. Saving it as a project just lets you easily switch between projects using ctrl+alt+p/cmd+alt+p.
Set the type, host, user and password options as appropriate for your server. Then also configure the following options:
Once the setup is complete, the workflow for working on a server goes like this:
Hopefully this provides a useful workflow for those of you that are required to work off of a server. If you have any suggestions for Sublime SFTP, or this workflow, please shoot me an email at firstname.lastname@example.org.
In addition to the solution available via Sublime SFTP and automated uploads and sync operations, it is possible to use a number of different software packages to present a remote FTP or SFTP server as a local filesystem.
For some users, these solutions are great, other users have complained about performance issues. This is usually because when you open a file with one of these packages, it can't be read until it is fully downloaded which gives a lag to the interface. Additionally, Sublime Text has to download every file in order to do things like folder searches. However, don’t take my word for it, just try one out!