···4444INSTALLATION AND SETUP *yankbank-nvim-yankbank-installation-and-setup*
454546464747-WITHOUT PERSISTENCE:
4747+WITH PERSISTENCE (RECOMMENDED)
48484949-Lazy:
4949+Using lazy.nvim
50505151>lua
5252 {
5353 "ptdewey/yankbank-nvim",
5454+ dependencies = "kkharji/sqlite.lua",
5455 config = function()
5555- require('yankbank').setup()
5656+ require('yankbank').setup({
5757+ persist_type = "sqlite",
5858+ })
5659 end,
5760 }
5861<
596260636161-WITH PERSISTENCE
6464+WITHOUT PERSISTENCE:
62656363-Lazy:
6666+Using lazy.nvim
64676568>lua
6669 {
6770 "ptdewey/yankbank-nvim",
6868- dependencies = "kkharji/sqlite.lua",
6971 config = function()
7070- require('yankbank').setup({
7171- persist_type = "sqlite",
7272- })
7272+ require('yankbank').setup()
7373 end,
7474 }
7575<
···9696EXAMPLE CONFIGURATION
97979898>lua
9999- config = function()
100100- require('yankbank').setup({
101101- max_entries = 9,
102102- sep = "",
103103- num_behavior = "prefix",
104104- focus_gain_poll = true,
105105- keymaps = {
106106- paste = "<CR>",
107107- },
108108- num_behavior = "prefix",
109109- persist_type = "sqlite",
110110- registers = {
111111- yank_register = "+",
112112- },
113113- })
114114- end,
9999+ {
100100+ "ptdewey/yankbank-nvim",
101101+ config = function()
102102+ require('yankbank').setup({
103103+ max_entries = 9,
104104+ sep = "-----",
105105+ num_behavior = "jump",
106106+ focus_gain_poll = true,
107107+ persist_type = "sqlite",
108108+ keymaps = {
109109+ paste = "<CR>",
110110+ },
111111+ registers = {
112112+ yank_register = "+",
113113+ },
114114+ })
115115+ end,
116116+ }
115117<
116118117119If no separator is desired, pass in an empty string for `sep`
···123125entry 3) - Note: If 'max_entries' is a two-digit number, there will be a delay
124126upon pressing numbers that prefix a valid entry.
125127128128+The 'focus_gain_poll' option allows for enabling an additional autocommand that
129129+watches for focus gains (refocusing Neovim window), and checks for changes in
130130+the unnamedplus ('+') register, adding to yankbank when new contents are found.
131131+This allows for automatically adding text copied from other sources (like a
132132+browser) to the yankbank without the bank opening trigger. Off by default, but
133133+I highly recommend enabling it with `focus_gain_poll = true`.
134134+126135127136PERSISTENCE ~
128137129129-If persistence between sessions is desired, sqlite.lua will be used to create a
138138+For the best experience with YankBank, enabling persistence is highly
139139+recommended. If persistence is enabled, sqlite.lua will be used to create a
130140persistent store for recent yanks in the plugin root directory. To utilize
131141sqlite persistence, `"kkharji/sqlite.lua"` must be added as a dependency in
132142your config, and `persist_type` must be set to `"sqlite"`
···145155 }
146156<
147157148148-The'focus_gain_poll' option allows for enabling an additional autocommand that
149149-watches for focus gains (refocusing Neovim window), and checks for changes in
150150-the unnamedplus ('+') register, adding to yankbank when new contents are found.
151151-This allows for automatically adding text copied from other sources (like a
152152-browser) to the yankbank without the bank opening trigger. Off by default, but
153153-I highly recommend enabling it (`focus_gain_poll = true`)
154154-155158156159USAGE *yankbank-nvim-yankbank-usage*
157160158158-The popup menu can be opened with the command:`:YankBank`, an entry is pasted
159159-at the current cursor position by hitting enter, and the menu can be closed by
161161+Thepopup menu can be opened with the command:`:YankBank`, an entry is pasted at
162162+the current cursor position by hitting enter, and the menu can be closed by
160163hitting escape, ctrl-c, or q. An entry from the menu can also be yanked into
161164the unnamedplus register by hitting yy.
162165···170173171174POTENTIAL IMPROVEMENTS *yankbank-nvim-yankbank-potential-improvements*
172175173173-- Polling on unnamedplus register to populate bank in more intuitive manner (could be enabled as option)
174176- nvim-cmp integration
175177- fzf integration
176178- telescope integration