Skip to content

Keybindings for snippets #20036

@paularmstrong

Description

@paularmstrong

Check for existing issues

  • Completed

Describe the feature

Context:

In vscode, sublime, textmate, bbedit… for 20+ years I've had a snippet configured with key bindings that looks like this (vscode):

{
  "html tag": {
    "scope": "javascriptreact,typescriptreact,html,astro",
    "body": "<${1:div}${2}>${3:$TM_SELECTED_TEXT}</$1>",
    "description": "Create an HTML/JSX tag"
  },
}

In vscode keybindings:

[
  {
    "key": "ctrl+cmd+,",
    "command": "editor.action.insertSnippet",
    "when": "editorTextFocus",
    "args": {
      "langId": "javascriptreact",
      "name": "html tag"
    }
  }
]

Feature

The ability to trigger a snippet with tabbable placeholder macros via key bindings, just like other editors.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

Metadata

Metadata

Assignees

Labels

area:parity/vscodeFeedback for VSCode parity featuresarea:snippetsFeedback for Zed snippetsnever staleto keep the stalebot away

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions