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

Using a keybinding as an alias #351

Open
1 task done
oiiiiiiii opened this issue Sep 25, 2024 · 1 comment
Open
1 task done

Using a keybinding as an alias #351

oiiiiiiii opened this issue Sep 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@oiiiiiiii
Copy link

Checklist

  • Have you read through :h nvim-surround to see if there might be any relevant information there?

Is your feature request related to a problem? Please describe.
I want to add a new alias that is not just one character, but instead a keybinding (in my case <A-.>. I tried the following setup (lazy), but it doesn't work:

return {
    "kylechui/nvim-surround",
    version = "*", -- Use for stability; omit to use `main` branch for the latest features
    event = "VeryLazy",
    config = function()
        require("nvim-surround").setup({
            aliases = {
                ["<A-.>"] = ")"
            }
        })
    end
}

When I replace the keybinding with a single character (e.g. d), it works fine. But I would like this as a keybinding, as I mapped that to ")" everywhere else.

Describe the solution you'd like
Being able to not only map single characters for an alias, but instead keybindings (if that is possible).

Additional context
None

@oiiiiiiii oiiiiiiii added the enhancement New feature or request label Sep 25, 2024
@oiiiiiiii
Copy link
Author

I also tried mapping <A-.> to ) in every vim mode there is, but this doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant