Sublime Forum

How can I lock files when opened?

#1

how can I lock files when opened?

so if I have 2 computers, A and B, and open a file on A, I don’t want to be able to open it on B.

0 Likes

#2

Why do you want this?
I believe Subversion will let you do this, though.

0 Likes

#3

because I have 3 computers. A,B,C. A has the files. that I access from B and C. B is upstairs, C is downstairs.

If I open a file from B, and edit it, and don’t save it yet and don’t close it. Then I go to C, and open the file, then I won’t be opening the latest.

And once I have both open, if I make changes on one, and don’t save them yet, then I make changes on the other, then i’m screwed I have to save it seutpareately as two different files one on B, one on C, and see where they differ, and combine them so each has the latest changes.

If I could keep the file locked while open then I wouldn’t have that occur.

Autosave has a disadvantage that if the network connection is down then I could get the above problems. So that’s why I want sublime to lock the file while open.

0 Likes

#4

I have a similar situation at home, but I’ve yet to run into trouble. My files sync over Dropbox. I do try to be careful and generally won’t leave files unsaved. Actually, now that I think about it, I very rarely run Sublime on more than one computer. (My Packages folder syncs between my machines at home and my set up at work.)

[quote=“wasilto”]
Autosave has a disadvantage that if the network connection is down then I could get the above problems. So that’s why I want sublime to lock the file while open.[/quote]

If there’s no network connection, how would you expect Sublime (or rather a plugin) to communicate the fact that the file is locked ?

0 Likes