Skip to content

Is there anyway to add multiple bindings to same action for mini.comment #649

Closed Answered by echasnovski
jacobrreed asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, 'mini.comment' is not designed for this. But you can use one thing that should work (and I think will work in the foreseeable future).

Call setup() twice with different mappings: one for gc and the other for <C-/>. As setup() only creates mappings and does not delete, this should work as expected. So something like this:

require('mini.comment').setup()
require('mini.comment').setup({
  mappings = {
    comment = '<C-/>',
    comment_line = '<C-/><C-/>',
    comment_visual = '<C-/>',
  },
})

Note that I tried that in my terminal emulator and it could not use <C-/> per se (although mappings are there). <M-/> worked, though.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jacobrreed
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants