Atom should save new files where the last opened/saved file was

When you create a new buffer and hit save, Atom will present me with a save dialog and the default selected folder is the project root. That’s almost never the place I want to put a file.

Sublime Text was a lot smarter with this — although I do not remember the exact heuristics. For example, it would propose saving the file in the same location where the file you last had opened was. This worked really well for me: Usually I create a new file by splitting an existing file, creating a test for a module (and those two are in directly adjacent directories) or similar.

Even if I want to save to the root directory, which is the current behavior, navigating upwards in the file save dialog is really simple.

PS: I am using Atom 0.187.0

6 thoughts on “Atom should save new files where the last opened/saved file was

  1. This issue should be re-opened because the other topic dealt with, and added, the feature only for opening a file not saving.
    The feature request in question here is that, when you open a new file and save it – the default location should be that of the last opened file rather than project root.
    (as sublime does, and is brilliant)

  2. Please re-open this. It’s very surprising to have the save dialog open at the project’s root directory, and somewhat frustrating to have to re-navigate to the folder I was just in.

    Alternatively, what is the expected user behavior for creating new files and saving them? It seems currently it is to re-navigate each time. Usually I’m editing a file in a subdirectory, press Cmd+N to open a new file (that I’d like in that subdirectory), edit it, and press Cmd+S to save. Is there an alternative approach that would cause the save dialog to root itself in the last edited-in directory?

    Update: discovered you can right click a directory in tree view and select New File to create a new file in that directory.


  3. In 2015 when I reported this bug, “File Save” would go to the project directory that was active when Atom was started. My proposal was to use the the directory of the last opened file. You are correct, currently I am experiencing #13978, i.e. “File Save” goes to a random directory.
    However, this issue here was not about bringing back the “2016” behavior, but actually improving the heuristics (just like with “File Open”). I’m also happy if that is where #13978 is going.