+203
Аяқталған

Update tabs after renaming file

sofa-420 14 year бұрын updated by Anders Ingemann 8 year бұрын 13
When you rename a file in the sidebar, if you have that file open in a tab it'd be nice if it knew it was renamed, and would save to the correct file instead of essentially copying the new file back.

Answer

-1
Answer
Аяқталған
Added in 2181
-1
yes, the current behavior is counter-intuitive and unlike other editors. 
-1

current behaviour is quite confusing.

This always bites me in the ass and interrupts flow.


When renaming a file, any tabs that had the file open should be "renamed" as well and be bound to the newly named file.


BTW, is there a default keybinding for "rename current file" for the tab under focus?

-1
This always catches me out - if you have the file in an open tab and rename it, but forget to close the old one, you can end up with the old one 'coming back' if you do a 'save all' later.
I am not sure why this hasn't already been implemented! It keeps annoying the hell out of me when renaming a file and having a tab open. Most editors/ides I've worked with (Eclipse, VS.Net, etc) do this by default and saves me a bunch of time.
Yes this is one of the issues I encounter most often. Please please fix this!
-1
This made me lose so much time, so many times :(
-1
It is pretty confusing as it is now. I don't know of any other editor that behaves this way. Please change it.
This happened to me again just the other day, I kept changing a file and saving it, but my changes weren't showing in my web app. I was about to throw my laptop out the window and it was because I renamed the file, thought I reopened it but didn't, so I kept saving the file back into its old directory. UGH!!!!
-1
Answer
Аяқталған
Added in 2181
-1

Sorry is that really added?

I'm using sublime text 3 (3126);

```

subl foo.c

mv foo.c bar.c

```

now the tab containing foo.c is marked as `unsaved` instead of having it's file name updated

-1

It is. You are using `mv` outside of sublime text, it's quite a bit more complex to detect changes outside than it is when renaming through ST.

The issue was "When you rename a file in the sidebar" :-)