Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bradphelan opened this issue Apr 29, 2024 · 0 comments
Open

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

bradphelan opened this issue Apr 29, 2024 · 0 comments

Comments

@bradphelan
Copy link

bradphelan commented Apr 29, 2024

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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant