"Save As..." not keeping the current file extension?

It seems Atom doesn’t keep the file extension when you choose “File -> Save As…” to save the current file with a different name?

For example I open a “abc.txt” file and edited some parts of it, then I want to save it under a different name, after I choose “Save As…” it shows the current file name “abc” in the dialog box, but after I change “abc” to “def” and press Enter, it’s not save as a “def.txt”, but a plain extension-less file named “def”. I have to explicitly type “def.txt” to save it as a txt file.

This behavior is driving me crazy, I can understand that you may want to change the extension of the file sometimes on “Save As…”, but more than 99% of the time when I choose “Save As…” I want to save it as a different file name with the same file extension. Is there any configuration or extension that can help me keep the current file extension when I click “Save As…”?

You will probably have to type the file extension every time you rename a file. It is not an easy task to mess with an OS-level operation (like the save dialog) and I don’t know of any package that replaces the save dialog with a JavaScript-coded dialog.

That really sucks, can’t understand why Atom is different from all the other code editors/IDEs out there, AFAIK all other editors keep the same file extension with “Save As…” unless the user explicitly choose not to.

I like Atom’s wide array of extensions and features, but having to type .js/.py/.java/.c/.html/etc. every time I choose “Save As…” is really annoying.

How often are you using save as? I don’t think I’ve ever used it before.

Depending on the current work task, can be quite often, for example trying and tinkering around different data parameters in nodejs and python scripts.

Because Atom is written almost exclusively in JavaScript and changing the Save As dialog’s behavior (like telling it what file extensions belong to what files) requires native-level code. Chromium has no knowledge of the extensions of code files, so no application based on Chromium (like Atom is) is going to by default unless someone goes in and makes it that way.

I think VS Code is also based exclusively in JavaScript/Electron, same as Atom, while VS Code’s “Save As…” feature can keep the current file extension correctly…

Which tells us that someone added the feature. Since Atom doesn’t have it, one of two things is true: either the developers considered including it and didn’t, or they didn’t think about it.