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: improved readme

ptdewey 20e0edc7 cf069624

+31 -28
+31 -28
README.md
··· 20 20 21 21 ## Installation and Setup 22 22 23 - #### Without persistence: 23 + #### With Persistence (Recommended) 24 24 25 - Lazy: 25 + Using lazy.nvim 26 26 ```lua 27 27 { 28 28 "ptdewey/yankbank-nvim", 29 + dependencies = "kkharji/sqlite.lua", 29 30 config = function() 30 - require('yankbank').setup() 31 + require('yankbank').setup({ 32 + persist_type = "sqlite", 33 + }) 31 34 end, 32 35 } 33 36 ``` 34 37 35 - #### With Persistence 38 + #### Without persistence: 36 39 37 - Lazy: 40 + Using lazy.nvim 38 41 ```lua 39 42 { 40 43 "ptdewey/yankbank-nvim", 41 - dependencies = "kkharji/sqlite.lua", 42 44 config = function() 43 - require('yankbank').setup({ 44 - persist_type = "sqlite", 45 - }) 45 + require('yankbank').setup() 46 46 end, 47 47 } 48 48 ``` ··· 70 70 #### Example Configuration 71 71 72 72 ```lua 73 - config = function() 74 - require('yankbank').setup({ 75 - max_entries = 9, 76 - sep = "", 77 - num_behavior = "prefix", 78 - focus_gain_poll = true, 79 - keymaps = { 80 - paste = "<CR>", 81 - }, 82 - num_behavior = "prefix", 83 - persist_type = "sqlite", 84 - registers = { 85 - yank_register = "+", 86 - }, 87 - }) 88 - end, 73 + { 74 + "ptdewey/yankbank-nvim", 75 + config = function() 76 + require('yankbank').setup({ 77 + max_entries = 9, 78 + sep = "-----", 79 + num_behavior = "jump", 80 + focus_gain_poll = true, 81 + persist_type = "sqlite", 82 + keymaps = { 83 + paste = "<CR>", 84 + }, 85 + registers = { 86 + yank_register = "+", 87 + }, 88 + }) 89 + end, 90 + } 89 91 ``` 90 92 91 93 If no separator is desired, pass in an empty string for `sep` ··· 95 97 - `num_behavior = "jump"` jumps to entry matching the pressed number key (i.e. '3' jumps to entry 3) 96 98 - Note: If 'max_entries' is a two-digit number, there will be a delay upon pressing numbers that prefix a valid entry. 97 99 100 + The 'focus_gain_poll' option allows for enabling an additional autocommand that watches for focus gains (refocusing Neovim window), and checks for changes in the unnamedplus ('+') register, adding to yankbank when new contents are found. This allows for automatically adding text copied from other sources (like a browser) to the yankbank without the bank opening trigger. Off by default, but I highly recommend enabling it with `focus_gain_poll = true`. 101 + 98 102 ### Persistence 99 - If persistence between sessions is desired, sqlite.lua will be used to create a persistent store for recent yanks in the plugin root directory. 103 + For the best experience with YankBank, enabling persistence is highly recommended. 104 + If persistence is enabled, sqlite.lua will be used to create a persistent store for recent yanks in the plugin root directory. 100 105 To utilize sqlite persistence, `"kkharji/sqlite.lua"` must be added as a dependency in your config, and `persist_type` must be set to `"sqlite"`: 101 106 102 107 ```lua ··· 113 118 } 114 119 ``` 115 120 116 - The 'focus_gain_poll' option allows for enabling an additional autocommand that watches for focus gains (refocusing Neovim window), and checks for changes in the unnamedplus ('+') register, adding to yankbank when new contents are found. This allows for automatically adding text copied from other sources (like a browser) to the yankbank without the bank opening trigger. Off by default, but I highly recommend enabling it (`focus_gain_poll = true`) 117 121 118 122 ## Usage 119 123 ··· 128 132 129 133 130 134 ## Potential Improvements 131 - - Polling on unnamedplus register to populate bank in more intuitive manner (could be enabled as option) 132 135 - nvim-cmp integration 133 136 - fzf integration 134 137 - telescope integration