Skip to content

Generate cheatsheet extension-side #2099

Open
@pokey

Description

@pokey

The way we generate the cheatsheet today is a bit of a hack. We'd like to generate it extension-side using the new spoken form sharing mechanism.

We could have a list of canonical command fragments, using the placeholder mechanism described in #2096, and then generate the spoken form and description from each of these canonical command fragments. For example:

actions = [
  {
    name: "remove",
    target: PLACEHOLDER,
  },
  {
    name: "pasteFromClipboard",
    destination: PLACEHOLDER,
  },
];

scopeTypes = [
  {
    type: "line",
  },
  {
    type: "surroundingPair",
    delimiter: PLACEHOLDER,
  },
];

modifiers = [
  {
    type: "relativeScope",
    scopeType: PLACEHOLDER,
    offset: GREATER_THAN_ZERO,
  }, {
    type: "relativeScope",
    scopeType: PLACEHOLDER,
    offset: 0,
  },
];

Then we can run generate spoken form to get the following entries for actions:

  • "chuck <target>" => remove <target>
  • "paste <destination>" => paste from clipboard at <destination>

and for scope types:

  • "line" => line
  • "<delimiter>" => <delimiter> pair

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityImprovements to code qualitydocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions