VSCodeVim / VSCodeVim/Vim

Allow specifying multi char strings for vim.*KeyBinding* options

Open
#9,010 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

When I want to create key maps with many sequential characters then there is way too much boiler plate. For example in vim script

nnremap ,nf di//clang-format off<cr>//clang-format on<esc>P

maps to

{
      "before": ["<leader>", "n", "f"],
      "after": [
        "d",
        "i",
        "/",
        "/",
        " ",
        "c",
        "l",
        "a",
        "n",
        "g",
        "-",
        "f",
        "o",
        "r",
        "m",
        "a",
        "t",
        " ",
        "o",
        "f",
        "f",
        "\n",
        "/",
        "/",
        " ",
        "c",
        "l",
        "a",
        "n",
        "g",
        "-",
        "f",
        "o",
        "r",
        "m",
        "a",
        "t",
        " ",
        "o",
        "n",
        "<Esc>",
        "P"
      ]
    }

which is really unnecessary. It should be possible to do

{
  "before": "<leader>nf",
  "after": "di//clang-format off<cr>//clang-format on<esc>P"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the TypeScript code that handles vim.KeyBinding options; done means the string-shaped before/after example is accepted alongside the existing array-shaped form, with tests if the project has coverage there.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.