
You can also use this feature to sync the yank history across multiple running instances of Vim by updating Neovim's shada file. Note that since ShaDa support only exists in Neovim this feature is not available for Vim. When g:yoinkSavePersistently is set to 1, the yank history will be saved persistently by taking advantage of Neovim's "ShaDa" feature. g:yoinkSyncSystemClipboardOnFocus - When set to 0, the System Clipboard feature described below will be disabled.When set to 0, only changes to the default register will be recorded.

g:yoinkIncludeNamedRegisters - When set to 1, all yanks for all registers will be included in the history.When set to 0, it will cycle back to the other end of the history so you can swap in the same direction forever. g:yoinkSwapClampAtEnds - When set to 1, when we reach the beginning or end of the yank history, the swap will stop there.Will also add to the jumplist if the cursor is moved more than 1 line. And also causes consecutive multiline pastes to be ordered correctly instead of interleaved together. Setting to 1 can be nicer because it makes the post-paste cursor position more consistent between multiline and non-multiline pastes (that is, the cursor will be at the end in both cases). Default is 0 which will match normal Vim behaviour and place the cursor at the beginning when pasting multiline yanks. g:yoinkMoveCursorToEndOfPaste - When set to 1, the cursor will always be placed at the end of the paste.Note that you can also leave this off and use the toggle key instead for cases where you want to format after the paste. g:yoinkAutoFormatPaste - When set to 1, after a paste occurs it will automatically be formatted (using = key).g:yoinkSavePersistently - When set to 1, the yank history will be saved persistently across sessions of Vim.g:yoinkIncludeDeleteOperations - When set to 1, delete operations such as x or d or s will also be added to the yank history.See here for an explanation of why we would want do do this. g:yoinkSyncNumberedRegisters - When set to 1, every time the yank history changes the numbered registers 1 - 9 will be updated to sync with the first 9 entries in the yank history.You can optionally override the default behaviour with the following settings: This will reduce the history down to 1 entry taken from the default register.

:Yanks - Display the current yank history This can be more useful especially when yanking a large text object such as a paragraph. However - if you do want to permanently cycle through the history, you can do that too:Īfter adding this map, yank will function exactly the same as previously with the one difference being that the cursor position will not change after performing a yank. Note that the swap operations above will only affect the current paste and the history order will be unchanged. However, the vim-subversive plugin integrates with Yoink and does provide that functionality. Note that yoink does not support swapping when doing paste in visual mode and so we do not add an xmap for p here. Otherwise paste functionality should be the same as default. We also need to override the p and P keys to notify Yoink that a paste has occurred, so that swapping via the and keys can be enabled.

With these mappings, immediately after performing a paste, you can cycle through the history by hitting and " Also replace the default gp with yoink paste so we can toggle paste in this case too nmap gp (YoinkPaste_gp)
