visual-studio-codeeditor

Disable untitled editor improvement - first line name in the title


Is there any to revert/disable the newest change for the untitled tab name (https://code.visualstudio.com/updates/v1_42#_untitled-editor-improvements)

I would prefer to the untitled-1 than the first sentence line.


Solution

  • As your link says:

    Note: If the first line is empty or does not contain any words, the title will fall back to Untitled-* as before.

    I don't think there is a way to disable it other than to have that first line blank until you do give it a name.

    The request for a setting to disable the current functionality is tracked here: https://github.com/microsoft/vscode/issues/90378 (Config to limit/disable the new Untitled tab auto-naming) or https://github.com/microsoft/vscode/issues/90495

    you could upvote that issue.

    ---------- update, coming in v1.43:

    A new setting workbench.editor.untitled.labelFormat lets you control whether untitled editors should use the file contents as the title or not. Possible values are content or name. Configure 'workbench.editor.untitled.labelFormat': 'name' for the previous behavior, where untitled editors would have a short title, such as Untitled-1.

    When pasting text into an untitled editor, VS Code now automatically tries to detect the language mode from the first line of text. For example, pasting XML will set the XML mode automatically upon paste if the first line contains the typical XML header .