[Question] How paste registers from delete actions
Hello, I'm having a hard time using the x register. Whenever I cut something with x, and then try to paste with p/P --each mapped as suggested nmap p <plug>(YoinkPaste_p)-- I don't get the cutted text pasted. I have to swap along the yanks. Is it there a way yo make the cuts to be stored in the first register that Yoink uses when pasting?
Thanks in advance
Have you tried enabling g:yoinkIncludeDeleteOperations?
Yes, the overall plugin configuration I'm using is,
let g:yoinkSavePersistently = 1 "" Use the SHAred DAta (SHADA) of nvim
let g:yoinkMaxItems = 20
let g:yoinkSyncNumberedRegisters = 1
let g:yoinkIncludeDeleteOperations = 1
nmap <A-p> <plug>(YoinkPostPasteSwapBack)
nmap <A-n> <plug>(YoinkPostPasteSwapForward)
nmap p <plug>(YoinkPaste_p)
nmap P <plug>(YoinkPaste_P)
I can't reproduce it
Here's my full neovim init.vim:
call plug#begin('~/.vim/plugged')
Plug 'svermeulen/vim-yoink'
call plug#end()
let g:yoinkSavePersistently = 1 "" Use the SHAred DAta (SHADA) of nvim
let g:yoinkMaxItems = 20
let g:yoinkSyncNumberedRegisters = 1
let g:yoinkIncludeDeleteOperations = 1
nmap <c-p> <plug>(YoinkPostPasteSwapBack)
nmap <c-n> <plug>(YoinkPostPasteSwapForward)
nmap p <plug>(YoinkPaste_p)
nmap P <plug>(YoinkPaste_P)
Using MacOs, neovim 0.4.2
With that, if I delete a bunch of characters using x then they can be toggled to using <c-n> / <c-p> and also show up in the :Yanks popup. Maybe it's a conflict with another plugin?
With that, if I delete a bunch of characters using
xthen they can be toggled to using<c-n>/<c-p>and also show up in the:Yankspopup. Maybe it's a conflict with another plugin?
Is swapping yanks the intended behaviour? all I'm trying to do is being able to p right after using x without needing to c-p each time I x something. Thats really my question
Oh sorry I misread your question. But it still works how you describe when I test it. Given the text bar and with cursor on the a, hitting xp transforms it to bra
The behaviour actually happens when I'm cutting more than a single character,

Alt + p is my key mapping to swap between Yanks
Ok I have reproduced it now
I noticed that it seems to stop happening when I add set clipboard=unnamed or set clipboard=unnamedplus
Another thing I noticed is that if you execute vwwx then execute :reg<cr> you'll see that the word replaces the default register " like you would expect. When you execute Vx though, the " is unchanged. It seems like this behaviour is part of the problem. I don't really understand why vim behaves differently for V
It might be related to this: https://github.com/neovim/neovim/issues/11202
It might be related to this: neovim/neovim#11202
I don't think it is because it's supposed to be fixed, but I still have the issue with nightly NVIM v0.5.0-dev+1314-g7b0edaac5 when I don't use unnamed or unnamedplus.
If I yank a paragraph normally, it gets in my :Yanks history AND " register as expected:
(Note that somehow :Yanks is showing me some garbage but this is not causing any trouble)
Then, if I try my cut operation, again :Yanks is properly updated:
But this time, the " register is not updated properly:
And I still have the previous value.
And now, if I try to cut yet something else…
" register holds the previous cut so I can actually paste the content of my previous cut after I cut something else.

My full config is here. Relevant parts:
let g:yoinkSyncNumberedRegisters = 1
let g:yoinkSavePersistently = 1
let g:yoinkSyncSystemClipboardOnFocus = 1
let g:yoinkIncludeDeleteOperations = 1
nmap <c-n> <Plug>(YoinkPostPasteSwapBack)
nmap <c-p> <Plug>(YoinkPostPasteSwapForward)
nmap p <Plug>(YoinkPaste_p)
nmap P <Plug>(YoinkPaste_P)
nmap gp <Plug>(YoinkPaste_gp)
nmap gP <Plug>(YoinkPaste_gP)
" do not yank on delete operations
nnoremap d "_d
vnoremap d "_d
nnoremap h "_c
vnoremap h "_c
" cut operation
nnoremap <leader><leader>d d
vnoremap <leader><leader>d d
nnoremap <leader><leader>h c
vnoremap <leader><leader>h c