Registers.nvim Versions Save

📑 Neovim plugin to preview the contents of the registers

v2.3.0

1 year ago

Deprecated

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.

Added

  • Dynamic binding of keys in the bind_keys map using Vim key strings

Fixed

New Contributors

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.2.2...v2.3.0

v2.2.2

1 year ago

Fixed

  • Append (uppercase) register regression (#23)

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.2.1...v2.2.2

v2.2.1

1 year ago

Fixed

  • Pressing a register key that wasn't already filled didn't properly select the register (#85)

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.2.0...v2.2.1

v2.2.0

1 year ago

Added

  • clear_highlighted_register() function, which will empty the register under the cursor in the registers window
  • bind_keys.delete option, bound to clear_highlighted_register() by default
  • bind_keys.backspace option, bound to clear_highlighted_register() by default

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.1.2...v2.2.0

v2.1.2

1 year ago

Fixed

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.1.1...v2.1.2

v2.1.1

1 year ago

Fixed

New Contributors

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.1.0...v2.1.1

v2.1.0

1 year ago

Added

  • 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 register
  • if_mode option to all callbacks, only triggering the callback when the current mode is matched
  • after option to all callbacks, allowing another function to be chained to the callback
  • on_register_highlighted event, which triggers when the register on which the cursor is placed changes
  • registers.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

Fixed

New Contributors

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v2.0.0...v2.1.0

v2.0.0

1 year ago

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,
}

Breaking Changes

  • All configuration is now done with a Lua table passed to the .setup({..}) function.
  • Minimum required Neovim version is 0.7.0.

Added

  • Neovim help file, which can be accessed with :h registers.
  • Sign highlights are now configurable.
  • Opening of the window in different modes (visual, normal, etc.) can now be manually mapped, there is an example for this in the help file.
  • Highlighting of cursorline can be disabled.
  • Window transparency is configurable.
  • All actions of the key bindings can be configured by binding a function to them, all functions can be found with :h registers.
  • The sign bar now also optionally shows how the register will be applied, in a charwise, linewise or blockwise way.
  • registers.move_cursor_to_register function.
  • Delays can be added to every bindable key function, which can be used to replace 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 }),
  }
})

Removed

  • min_height and max_height are no longer configurable.

Other Changes

  • A specific sign bar is used instead of a manual *reg*: string.
  • The highlight for the popup window is now "NormalFloat" instead of "Normal", which is more consistent with other floating popup windows, since it's the default.
  • The bug where the window is tiny when it's opened at the bottom of the screen is now fixed.
  • Configuration of which keys to bind is more granular.
  • 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

v1.5.0

2 years ago

Added

  • paste_in_normal_mode = 2 option to paste the selected register in normal mode when selecting with Return (#55)

Fixed

  • Don't open the window when the buffer is not modifiable, for example :copen (#51)
  • Bug with the current buffer name @Frederick888

New Contributors

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.4.1...v1.5.0

v1.4.1

2 years ago

Fixed

  • Add missing colon (:) to default show configuration (#49)

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.4.0...v1.4.1