Disabling `auto-pairs` when pasting using `C-S-v`

Hi, I just started playing with Kakoune today, and I’m finding it interesting so far.

I’m using the auto-pairs plugin, and I want to disable it when I’m pasting something using C-S-v. If it’s enabled, it will insert a lot of extra closing delimiters (one for each opening delimiter in the copied text).

(I’m using tmux, and alacritty if that matters).

What version of Kakoune are you using?

Kakoune recently added support for “bracketed paste” mode which should disable hooks like the auto-pairs plugin (probably) uses when you paste something with C-S-v.

I’m on NixOS, and using Kakoune v2022.10.31, maybe that’s too old then?

Yes, it’s definitely something that’s landed since November. Hopefully there will be a new release soon; otherwise, NixOS may have a “kakoune-git” or “kakoune-nightly” package, or it’s pretty easy to build from source yourself.

I wanted to point out that usually it helps to disable hook execution for next command, so from normal mode try pasting like this: \i<c-s-v>

2 Likes