Neovim plugin improving access to clipboard history (mirror)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

auto-generate vimdoc

+23 -12
+23 -12
doc/yankbank-nvim.txt
··· 1 - *yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 June 11 1 + *yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 June 12 2 2 3 3 ============================================================================== 4 4 Table of Contents *yankbank-nvim-table-of-contents* ··· 23 23 YankBank stores the N recent yanks into the unnamed register (“), then 24 24 populates a popup window with these recent yanks, allowing for quick access to 25 25 recent yank history. Upon opening the popup menu, the current contents of the 26 - unnamedplus (+) register are also added to the menu (if they are different than 26 + unnamedplus (+) register are also added to the menu (if they are different from 27 27 the current contents of the unnamed register). 28 28 29 29 Choosing an entry from the menu (by hitting enter) will paste it into the ··· 73 73 | | keymaps.navigation_prev | string | `"k"` | | keymaps.paste | string | 74 74 `"<CR>"` | | keymaps.yank | string | `"yy"` | | keymaps.close | table of 75 75 strings | `{ "<Esc>", "<C-c>", "q" }` | | num_behavior | string defining jump 76 - behavior "prefix" or "jump" | `"prefix"` | | registers | table container for 77 - register overrides | `{ }` | | registers.yank_register | default register to 78 - yank from popup to | `"+"` | 76 + behavior "prefix" or "jump" | `"prefix"` | | focus_gain_poll | boolean | `nil` 77 + | | registers | table container for register overrides | `{ }` | | 78 + registers.yank_register | default register to yank from popup to | `"+"` | 79 79 80 - If no separator is desired, pass in an empty string for sep: 80 + 81 + EXAMPLE CONFIGURATION 81 82 82 83 >lua 83 84 config = function() 84 85 require('yankbank').setup({ 85 - max_entries = 12, 86 + max_entries = 9, 86 87 sep = "", 88 + num_behavior = "prefix", 89 + focus_gain_poll = true, 87 90 keymaps = { 88 91 navigation_next = "j", 89 92 navigation_prev = "k", 90 93 }, 91 - num_behavior = "prefix", 94 + registers = { 95 + yank_register = "+", 96 + }, 92 97 }) 93 98 end, 94 99 < 100 + 101 + If no separator is desired, pass in an empty string for `sep` 95 102 96 103 The 'num_behavior' option defines in-popup navigation behavior when hitting 97 104 number keys. - `num_behavior = "prefix"` works similar to traditional vim ··· 100 107 entry 3) - Note: If 'max_entries' is a two-digit number, there will be a delay 101 108 upon pressing numbers that prefix a valid entry. 102 109 110 + The 'focus_gain_poll' option allows for enabling an additional autocommand that 111 + watches for focus gains (refocusing Neovim window), and checks for changes in 112 + the unnamedplus ('+') register, adding to yankbank when new contents are found. 113 + This allows for automatically adding text copied from other sources (like a 114 + browser) to the yankbank without the bank opening trigger. Off by default, but 115 + I highly recommend enabling it (`focus_gain_poll = true`) 116 + 103 117 104 118 USAGE *yankbank-nvim-yankbank-usage* 105 119 ··· 119 133 POTENTIAL IMPROVEMENTS *yankbank-nvim-yankbank-potential-improvements* 120 134 121 135 - Persistence between sessions (through either sqlite database or just a file) 122 - - Polling on unnamedplus register to populate bank in more intuitive manner (could be enabled as option) 123 136 - nvim-cmp integration 124 137 - fzf integration 125 - - Setup options configuring which registers are included 126 138 127 139 128 140 ALTERNATIVES *yankbank-nvim-yankbank-alternatives* ··· 133 145 ============================================================================== 134 146 2. Links *yankbank-nvim-links* 135 147 136 - 1. *YankBank popup window*: assets/screenshot-1.png 137 - 2. *YankBank popup window zoomed*: assets/screenshot-2.png 148 + 1. *YankBank popup window zoomed*: assets/screenshot-2.png 138 149 139 150 Generated by panvimdoc <https://github.com/kdheepak/panvimdoc> 140 151