···11-*yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 August 31
11+*yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 September 12
2233==============================================================================
44Table of Contents *yankbank-nvim-table-of-contents*
···157157 }
158158<
159159160160+Note:The database can be cleared with the `:YankBankClearDB` command or by
161161+deleting the db file (found in the plugin install directory by default).
162162+163163+If you run into any SQL related issues, please file an issue on GitHub. (As a
164164+temporary fix, you can also try clearing the database)
165165+160166161167USAGE *yankbank-nvim-yankbank-usage*
162168163163-Thepopup menu can be opened with the command:`:YankBank`, an entry is pasted at
164164-the current cursor position by hitting enter, and the menu can be closed by
169169+The popup menu can be opened with the command:`:YankBank`, an entry is pasted
170170+at the current cursor position by hitting enter, and the menu can be closed by
165171hitting escape, ctrl-c, or q. An entry from the menu can also be yanked into
166172the unnamedplus register by hitting yy.
167173···181187Examples:
182188183189>lua
184184- -- get the 2nd entry in the bank
190190+ -- get the ith entry in the bank
185191 ---@param i integer index to get
186192 -- output format: { yank_text = "entry", reg_type = "v" }
187187- local e = require("yankbank.api").get_entry(2)
193193+ local e = require("yankbank.api").get_entry(i)
188194189195 -- add an entry to the bank
190196 ---@param yank_text string yank text to add to YANKS table
···193199194200 -- remove an entry from the bank by index
195201 ---@param i integer index to remove
196196- require("yankbank.api").remove_entry(1)
202202+ require("yankbank.api").remove_entry(i)
203203+204204+ --- pin entry to yankbank so that it won't be removed when its position exceeds the max number of entries
205205+ ---@param i integer index to pin
206206+ require("yankbank.api").pin_entry(i)
207207+208208+209209+ --- unpin bank entry
210210+ ---@param i integer index to unpin
211211+ require("yankbank.api").unpin_entry(i)
197212<
198213199214For more details about the API see lua/yankbank/api.lua <lua/yankbank/api.lua>