Repository navigation
How to open a paste window and set the content manually? #323
|
I set the I’d appreciate any guidance or suggestions on how to achieve this. |
Replies: 1 comment 3 replies
|
Hi @Zwlin98, Do you only want to have visual yanks open the paste window and disable it in normal mode? For example,
That is not possible at the moment, but I think would be pretty straight forward to implement. I could create an option to support this. Another alternative is if you choose another register, for example require('kitty-scrollback').setup({
{
paste_window = {
yank_register = 'a',
yank_register_enabled = true,
},
},
})This would switch from using the unnamed register So, There is an API to open the paste window as well, but no API to set the contents at the moment. You could do something similar to: require('kitty-scrollback.windows').open_paste_window() -- pass true to enter insert mode
vim.api.nvim_buf_set_lines(0, 0, -1, false, {'# add text', '# to paste window'} |
Hi @Zwlin98,
Do you only want to have visual yanks open the paste window and disable it in normal mode?
For example,
yydoes nothingVyyanks the line into the paste windowThat is not possible at the moment, but I think would be pretty straight forward to implement. I could create an option to support this.
Another alternative is if you choose another register, for example
a.This would switch from using the unnamed register
"toafor yanks causing the paste window to open.So,
yywouldn't open the paste window. But,"ayyorV"aywould.There is an…