📑 Neovim plugin to preview the contents of the registers
Custom key names in bind_keys
are now deprecated. Use Vim strings instead, replace the following mappings:
return_key
=> ["<CR>"]
ctrl_k
=> ["<C-k>"]
ctrl_j
=> ["<C-j>"]
ctrl_p
=> ["<C-p>"]
ctrl_n
=> ["<C-n>"]
escape
=> ["<Esc>"]
delete
=> ["<Del>"]
backspace
=> ["<BS>"]
These will be removed with the next major release in 3.0.0
.
bind_keys
map using Vim key stringspressing.nvim
by @yutkat in https://github.com/tversteeg/registers.nvim/pull/89
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.2.2...v2.3.0
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.2.1...v2.2.2
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.2.0...v2.2.1
clear_highlighted_register()
function, which will empty the register under the cursor in the registers windowbind_keys.delete
option, bound to clear_highlighted_register()
by defaultbind_keys.backspace
option, bound to clear_highlighted_register()
by defaultFull Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.1.2...v2.2.0
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.1.1...v2.1.2
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.1.0...v2.1.1
keep_open_until_keypress
option to registers.apply_register()
function options, which will keep the window open until a key is pressed after selecting a registerif_mode
option to all callbacks, only triggering the callback when the current mode is matchedafter
option to all callbacks, allowing another function to be chained to the callbackon_register_highlighted
event, which triggers when the register on which the cursor is placed changesregisters.preview_highlighted_register()
function, which will preview how the register will be applied in the future, currently it prints the register over the text on the cursor, full implementation blocked by https://github.com/neovim/neovim/pull/9496
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.0.0...v2.1.0
I've rewritten the whole repository to 100% use Lua, use modern Neovim functions, and use a Lua .setup({})
function which is consistent with the rest of the Neovim plugins. I've also added a bunch of new configuration options.
When old g:registers_..
variables are detected, a warning message will be shown with an automatically generated example of the new configuration.
You can start migrating with the following config for Packer:
use {
"tversteeg/registers.nvim",
config = function()
require("registers").setup()
end,
}
.setup({..})
function.:h registers
.visual
, normal
, etc.) can now be manually mapped, there is an example for this in the help file.:h registers
.registers.move_cursor_to_register
function.register_key_sleep = 1
:local registers = require("registers")
registers.setup({
bind_keys = {
-- Wait a second before applying the register when selecting it with a key, this also highlights the register selected
registers = registers.apply_register({ delay = 1 }),
-- Also wait a second before closing the window when pressing escape
escape = registers.close_window({ delay = 1 }),
}
})
min_height
and max_height
are no longer configurable.*reg*:
string."NormalFloat"
instead of "Normal"
, which is more consistent with other floating popup windows, since it's the default.paste_in_normal_mode
has been replaced with allowing each mode to be configured, for example to replace the old paste_in_normal_mode = 1
:local registers = require("registers")
registers.setup({
bind_keys = {
normal = registers.show_window({ mode = "paste" }),
}
})
To replace paste_in_normal_mode = 2
:
local registers = require("registers")
registers.setup({
bind_keys = {
return_key = registers.apply_register({ mode = "paste" }),
}
})
Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.5.0...v2.0.0
paste_in_normal_mode = 2
option to paste the selected register in normal mode when selecting with Return (#55):copen
(#51)Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.4.1...v1.5.0
:
) to default show
configuration (#49)Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.4.0...v1.4.1