Sublime Forum

Working seamlessly on Projects with different computers

#1

I am working on a project and the project-ralated files (.sublime-project and .sublime-workspace) are both saved in a Dropbox directory.

I would like to know if there is a way to work on the same project with another computer and for Sublime to automatically have the same files open for a given project.

This will make it much easier to work on two computers, and without such functionality I am finding it hard to see what the advantage of Projects are to start with.

My thinking is that the .sublime-project and .sublime-workspace files will sync automatically between the two computers because they are in Dropbox, so there should be some way to make this work.

Thanks in advance

1 Like

#2

The sublime-project file is a collection of folders, settings, and build commands that are specific to that project. Opening a sublime-project adds it to the list of recent projects, which is easily accessed via the menu Project > Switch Project… or by a keyboard shortcut (Command-Ctrl-P on Mac). This is great for switching between projects, while only keeping one window open (or by changing the focus of that one window).

Find out in more detail at the unofficial documentation for Projects:

The sublime-workspace is something akin to a cache file, and generally should Not be committed to SCM. This is where in-progress files are stored when "hot_exit" is enabled. This allows Sublime Text the ability to recover work after a crash.

I would recommend you investigate Source Control Management such as git and GitHub or BitBucket. Not only will it save you in cases that you wish you could tinker without making duplicate projects, but also recover old versions or remind you why you made an esoteric change some time ago.

My Personal experience with using DropBox as a sync method is very poor. Timing differences on when one computer would sync left some in-progress files on both machines in something of a limbo. Learning git saved me both from my mistakes of making edits on a project from two locations without syncing back to the cloud, and merging the diffs from both back into a singular canonical result.

1 Like

#3

Hi Mike,

Thanks for the reply.

I do indeed use git and even recently started using Sublime Merge, which I find to be a great git tool.

I am also familiar with idea of what Projects are, but I was hoping there is a way for them to remember what files I was working on last and then to open those files when I open the project in another computer.

That’s odd what you say about Dropbox because I find the syncing to work really well and very rarely get conflicts. I work on the same git repo from multiple computers and I find Dropbox allows this workflow to happen seamlessly.

Cheers!

0 Likes

#4

Technically this is what the workspace file is for; it keeps track of files you have open, any unsaved changes, view layouts, and so on that are specific to the project you’re working on. So theoretically what you’re doing would work, if circumstances are correct.

One thing that can get in the way of this is that if you don’t close the project on one machine before you open it on the other, workspace changes may not persisted to disk (and thus synced) before you open it on the other machine. Also as far as I’m aware the workspace is only read when you open the project, and since it likely saves state when you close one you have a bit of a juggling act if you’re actively swapping between machines.

Also, the paths stored in the workspace use their absolute paths so this isn’t going to work cross platform and also probably has issues if all of the machines that are participating don’t store files in the exact same location.

2 Likes

#5

Great, this is what I needed to know, thank you very much.

I am lucky since I have a Mac and Linux machines that both have the same usernames and thus absolute paths in my Dropbox folders; so this just might work.

Cheers!

0 Likes

#6

Any update @MikeMike ?
How is your sync setup working out?

0 Likes