Is there a way to rename file and don't have to reopen the lower documents?

So when I’m using Atom, sometimes I have to change a file’s name. When I rename the file, Atom seems to not recognize it, and the files that are open on Atom that were in that upper file’s directory still has the previous name in their directory. So it gets all messed up, and I end up closing all the documents I was working on and reopening them.

So my question is,
is there anyway to automatically change the opened file’s directory to the newly changed upper file’s name?

When you rename any file do you use the Atom internal rename command (F2)?

Select file in tree-view.
Right click.

Note that in tree-view right click on file you can also get file full path and project path and you can use this in a script to rename the file’s parent directory. I don’t know why you wish to do this but the tools are there.

1 Like

My testing agrees with @d_l; it should update properly as is.

If you are renaming with an external method, it’s reasonable to expect that the old path will persist. From Atom’s point of view, renaming a directory is like deleting it and its contents, and then creating an unrelated directory. I don’t think it will check to see if the new directory matches the structure of the old one, and if the file contents match.

1 Like