···5858| keymaps.navigation_next | string | `"j"` |
5959| keymaps.navigation_prev | string | `"k"` |
6060| keymaps.paste | string | `"<CR>"` |
6161+| keymaps.paste_back | string | `"P"` |
6162| keymaps.yank | string | `"yy"` |
6263| keymaps.close | table of strings | `{ "<Esc>", "<C-c>", "q" }` |
6364| num_behavior | string defining jump behavior "prefix" or "jump" | `"prefix"` |
···8182 persist_type = "sqlite",
8283 keymaps = {
8384 paste = "<CR>",
8585+ paste_back = "P",
8486 },
8587 registers = {
8688 yank_register = "+",
···118120}
119121```
120122121121-122123## Usage
123124124125The popup menu can be opened with the command:`:YankBank`, an entry is pasted at the current cursor position by hitting enter, and the menu can be closed by hitting escape, ctrl-c, or q.
···130131vim.keymap.set("n", "<leader>y", "<cmd>YankBank<CR>", { noremap = true })
131132```
132133133133-<!-- TODO: add section for api -->
134134+---
135135+136136+## API (WIP)
137137+138138+Some plugin internals are also accessible via the YankBank api.
139139+140140+Examples:
141141+```lua
142142+-- get the 2nd entry in the bank
143143+---@param i integer index to get
144144+-- output format: { yank_text = "entry", reg_type = "v" }
145145+local e = require("yankbank.api").get_entry(2)
146146+147147+-- add an entry to the bank
148148+---@param yank_text string yank text to add to YANKS table
149149+---@param reg_type string register type "v", "V", or "^V" (visual, v-line, v-block respectively)
150150+require("yankbank.api").add_entry("yank_text", "reg_type")
151151+152152+-- remove an entry from the bank by index
153153+---@param i integer index to remove
154154+require("yankbank.api").remove_entry(1)
155155+```
156156+157157+For more details about the API see [lua/yankbank/api.lua](lua/yankbank/api.lua)
158158+159159+---
134160135161## Potential Improvements
136162- nvim-cmp integration