Skip to content

Untitled Resource SaveAs should default to All Files (*.*) #450

@jel-massih

Description

@jel-massih

Experienced on Windows

Its a minor nuisance that when saving a new file, it always defaults to "Untitled-[X].txt" with Save as type set to "Plain Text". Therefore if you specify an extension and dont change the dropdown to all files (or correct type) it will save it like SampleFile.js.txt.

Propose that untitled files default to just "Untitled-[X]" with no extension and save as type set to all files.

Appears to be as simple as removing the mime type suggesestion in /src/vs/workbench/browser/parts/editor/untitledEditorInput.ts

    public suggestFileName(): string {
        if (!this.hasAssociatedFilePath) {
            let mime = this.getMime();
            if (mime) {
                return suggestFilename(mime, this.getName());
            }
        }

        return this.getName();
    }

Currently electron autoappends * . * on "all files", although looks like it was fixed v0.34.2+
Workaround in the meantime is to show no default text

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions