Default new file save location


A subtle feature in sublime is that the default save location for a new file will be in the same folder as the last file you just viewed. Some smarter default would be nice in Atom as well, just going to the root is pretty much never what you want to do and the save dialogue requires an unfortunate amount of clicking to actually go to the right folder.


I wrote the fancy-new-file package, inspired by Sublime’s Advanced New File. Basically, you hit ⎇⌘n and is presented with a dialog where you can type a path relative to your project root to create new files and/or directories. Zero clicking required.

I tried mimicking the related feature from the official Tree View package’s look and feel, which is incomplete for my needs and a little hidden, but might be enough for you. Right-clicking on a folder > Add File or Add Folder (they seem to open the exact same dialog tho, capable of creating files AND folders) or by switching focus to the tree view with “Ctrl-0”, moving to a directory with the arrow keys and hitting “a”.

Personally, I don’t like the OS X default open/save dialog, as it feels really sluggish on my mac (I don’t have an SSD) and is very much focused around clicking, in an environment (code editors) where I otherwise wouldn’t use the mouse at all.

For my package, the edge case happens when you open Atom without a project root, in which case I mimicked Advanced New File’s behaviour of using your home directory as the root. Do you think this meets your use case?