AdvancedNewFile icon indicating copy to clipboard operation
AdvancedNewFile copied to clipboard

Feature suggestion: do not create new file (and parent folders) until save

Open ggets opened this issue 9 years ago • 3 comments

Title pretty much explains it. Right now the moment you hit enter on the "Enter a path for a new file" bar the file is created and this is the only available behavior (to my knowledge at least).

ggets avatar May 26 '16 07:05 ggets

You're correct, that is the only behavior. Storing the directory and creating the file on save is an interesting point. Short of overriding the built in save function (which would simply be creating a new keymap for cmd/ctrl + s), I don't know how I'd do it. I think it would be doable though, from a technical perspective. Effectively, if the file already exists on disk, use the original save function. If it does not, check some saved "view" property to do the save.

skuroda avatar Jun 23 '16 19:06 skuroda

or a pre-save event? (if there is one, of course - i am not aware) but if there is, that would be a better choice, probably imo.

ggets avatar Jun 28 '16 12:06 ggets

Just for clarification, there is a pre-save event. Maybe not 6 years ago, but certainly now.

As for the actual feature itself, I'd probably make this configurable and also a global option, because I can see workflows where either behavior would be appreciated but in order not to mix it too much (for example by providing two commands), I'd rather make this an explicit choice for the user for all situations.

FichteFoll avatar Jul 19 '22 18:07 FichteFoll