Skip to content

Optional quick start from snippet/template in empty files #145929

Closed
@digitarald

Description

@digitarald

When starting a new file, I want to have the option to pick from template, so that I don't have to start from scratch and google for a boilerplate to paste in.

It happened a few times like this in user testing. Participants create a file, discover the intuitive language quick pick that the placeholder offers and are delighted 😁. With a blank file in hand they then wander off to search engines to find boilerplate to test 🤨. Some languages suffer worse than others from impossible to remember boilerplate (HTML 😭). I never saw participants using snippets or emmet as the magic fast path to fill a file quickly.

How might we apply the placeholder text that allows picking a language to also picking a template:

Starting with an untitled buffer:

  1. Create untitled buffer
  2. Placeholder text offers to pick a language -> Quick pick HTML
  3. Placeholder text offers to start from a template --> Quick pick html!!
  4. 🎉

From creating an empty file in the workspace:

  1. Create new index.html file in Explorer and open it.
  2. Placeholder text offers to start from a template --> Quick pick html!!
  3. 🎉

Snippets could be the existing system to provide those templates. They already have a prefix and description, which can be used in the quick pick. Their placeholders can also help to quickly name a component that is being created, set a title, etc.

cc @stevencl @sana-ajani

Ideas:

  • The quick pick selection could also preview the snippet as ghost text.
  • Easter egg for pasting a little HTML game or spinning VS Code logo.

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalitysnippetsunder-discussionIssue is under discussion for relevance, priority, approachverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions