Skip to content

Provide a command to create a new untitled file with a specific language set #152920

@karrtikr

Description

@karrtikr

VSCode provides workbench.action.files.newUntitledFile using which we can create a new untitled file, which then instructs to set a particular language:

newcreatepythonfile

We're working on our walkthrough in Python extension which directly offers to create a new python file, it would be great if the command supports an argument which accepts the language to create the file for.

cc/ @lramos15

Unfortunately we cannot use VSCode APIs to accomplish this as extension is not guaranteed to be activated when the walkthrough is opened, so the command isn't available when the button is clicked, see:

weirdcreatepythonfileexp

Metadata

Metadata

Assignees

Labels

apifeature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersverification-neededVerification of issue is requestedverifiedVerification succeededworkbench-untitled-editorsManaging of untitled editors in workbench window

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions