Sublime Forum

Renaming files in Finder creates duplicates

#1

ST2.0.2 on Mac OS X 10.9.3 iMac

Have ST2 open with the entire directory open where a web site is located on my hard drive so I can switch between files easily. I also have the same directory open in Finder, so I can more effectively manipulate the files, move them around between folders, rename them and such like. I have noticed that if I rename a file in Finder then the new name is implemented instantly in ST2 but ST2 keeps/creates a copy of the original file so that the original file with the original name still appears in Finder. I then have to go back and manually delete the original (pre-renaming) file(s) in Finder. I tested it just now:

I have a file open in ST2 and I choose to rename it in Finder, the name changes in the list of files in ST2, but the ‘open file’ at the top left still shows the old file name. If I close that file in ST2 then ST2 prompts me if I want to save changes or not, at which point if I select no, it saves the old file, so I now have two copies with different names. If it really was saving a copy of the original file, then I would prefer it if it made it clear we were talking about the pre-renamed copy and not the new version of the file I renamed.

I tried this in TextWrangler, which is free :wink:, and no such problems occur.

I know I can rename the file in ST2 but it’s a bit clunky and slower and in some instances it didn’t execute - either it was user error or a bug heh. I repeat it and it works so maybe it is user error.

0 Likes

#2

I don’t use ST2 any more, but in ST3 if you have a file open in the editor and you rename it from outside the tab in the editor remains, and indicates that the file has changed. If you close the tab it asks if you want to save the file. If you save it, you re-create the original file along with the renamed one; if you don’t save it, you end up with just the renamed one.

0 Likes