Closed RAV64 closed 1 week ago
fixed. let me know if any problems. thanks for opening the issue
btw, i'm not sure if a mapping like inoremap ( ()<left>
is possible. even without multicursors installed, pressing .
after typing hello(foo
only repeats the foo
.
will have to ponder this
i just tried an autopairs plugin and it successfully sets the .
register for us, so it works for multicursor. hooray !!
Amazing work - Thank you! Your reservation about the dot-repeat was absolutely correct. I've solved this on my end by doing this hacky thing I stole from mini.pairs.
local function escape(s)
return vim.api.nvim_replace_termcodes(s, true, true, true)
end
local left = escape("<C-g>U") .. escape("<left>")
And for the keymap I've set replace_keycodes = false
Both the multicursor and dot-repeat work as expected now 👍🏻
https://github.com/user-attachments/assets/ff5b76a1-0236-473a-b6f6-24d711b91e26
As the video shows, in insert mode keymapping where the input character exists in the output string - multicursors duplicate the output string after the input character.
a should become ab but becomes abb q should become qwe but becomes qwewe
This is a problem since I have a keymapping in insert mode which translates "(" into "()\", so none of my auto pairs work with multicursors currently.
https://github.com/user-attachments/assets/d8e4dadb-131e-4290-ac5f-cd3df645d56c
The output is strangely multiplied on both ends of the string when the initial letter exists in the middle of the output string 😅