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

Configure Feed

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

doc: add note about YankBankClearDB command and new api functions

ptdewey f48ccd92 8c282d9f

+16 -3
+16 -3
README.md
··· 120 120 } 121 121 ``` 122 122 123 + Note: The database can be cleared with the `:YankBankClearDB` command or by deleting the db file (found in the plugin install directory by default). 124 + 125 + If you run into any SQL related issues, please file an issue on GitHub. (As a temporary fix, you can also try clearing the database) 126 + 123 127 ## Usage 124 128 125 129 The 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. ··· 139 143 140 144 Examples: 141 145 ```lua 142 - -- get the 2nd entry in the bank 146 + -- get the ith entry in the bank 143 147 ---@param i integer index to get 144 148 -- output format: { yank_text = "entry", reg_type = "v" } 145 - local e = require("yankbank.api").get_entry(2) 149 + local e = require("yankbank.api").get_entry(i) 146 150 147 151 -- add an entry to the bank 148 152 ---@param yank_text string yank text to add to YANKS table ··· 151 155 152 156 -- remove an entry from the bank by index 153 157 ---@param i integer index to remove 154 - require("yankbank.api").remove_entry(1) 158 + require("yankbank.api").remove_entry(i) 159 + 160 + --- pin entry to yankbank so that it won't be removed when its position exceeds the max number of entries 161 + ---@param i integer index to pin 162 + require("yankbank.api").pin_entry(i) 163 + 164 + 165 + --- unpin bank entry 166 + ---@param i integer index to unpin 167 + require("yankbank.api").unpin_entry(i) 155 168 ``` 156 169 157 170 For more details about the API see [lua/yankbank/api.lua](lua/yankbank/api.lua)