registers.nvim

📑 Neovim plugin to preview the contents of the registers

GPL-3.0 License

Stars
604
Committers
24

Bot releases are visible (Hide)

registers.nvim - 2.3.0 Latest Release

Published by tversteeg over 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

registers.nvim - 2.2.2

Published by tversteeg almost 2 years ago

Fixed

  • Append (uppercase) register regression (#23)

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

registers.nvim - 2.2.1

Published by tversteeg almost 2 years 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

registers.nvim - 2.2.0

Published by tversteeg almost 2 years 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

registers.nvim - 2.1.2

Published by tversteeg almost 2 years ago

Fixed

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

registers.nvim - 2.1.1

Published by tversteeg almost 2 years ago

Fixed

New Contributors

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

registers.nvim - 2.1.0

Published by tversteeg almost 2 years 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

registers.nvim - 2.0.0

Published by tversteeg about 2 years 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

registers.nvim - 1.5.0

Published by tversteeg over 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

registers.nvim - 1.4.1

Published by tversteeg almost 3 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

registers.nvim - 1.4.0

Published by tversteeg almost 3 years ago

Added

  • paste_in_normal_mode option to automatically paste the selected register in normal mode (#47)

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

registers.nvim - 1.3.0

Published by tversteeg almost 3 years ago

Added

  • show option to configure which registers to show and in what order (#46)
  • normal_mode, visual_mode and insert_mode options to define when the popup will be shown (#45)

Fixed

  • Async loading (#41)

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.2.3...v1.3.0

registers.nvim - 1.2.3

Published by tversteeg almost 3 years ago

Fixed

  • Keymaps being lost on opening of new buffers (#42)

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.2.2...v1.2.3

registers.nvim - 1.2.2

Published by tversteeg about 3 years ago

Fixed

  • Async loading with packer (#41)
  • Visual mode key bindings (#40)

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.2.0...v1.2.2

registers.nvim - 1.2.1

Published by tversteeg about 3 years ago

Fixed

  • The plugin disturbing the handling of vim mechanics using registers (#34, #36)

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

registers.nvim - 1.2.0

Published by tversteeg about 3 years ago

Added

  • delay option for adding a delay to the opening of the window (#33)

Fixed

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v1.1.0...v1.2.0

registers.nvim - 1.1.0

Published by tversteeg over 3 years ago

Added

  • RegistersWindow highlight group for the whole floating window, for example: you can change the background of the window with :hi RegistersWindow ctermbg=blue (#31)
  • window_max_width option to set the maximum width of the floating window (#29)

Fixed

  • Version detection bug (#30)

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

registers.nvim - 1.0.0

Published by tversteeg over 3 years ago

Added

  • window_border option to change the border style of the popup with the possible values of "none", "single", "double", "rounded", "solid" or "shadow", "none" by default @jose-elias-alvarez
  • window_min_height option to set the minimum window height of the popup screen, 3 by default @hexium310
  • hide_only_whitespace option to hide registers exclusively filled with whitespace, which is disabled by default (#28)

Changed

  • trim_whitespace option defaults to 1, used to be 0

New Contributors

Full Changelog: https://github.com/tversteeg/registers.nvim/compare/v0.3.1...v1.0.0

registers.nvim - 0.3.1

Published by tversteeg over 3 years ago

Fixed

  • Append registers, the uppercase letters, throwing an error (#23)
registers.nvim - 0.3.0

Published by tversteeg over 3 years ago

Added

  • let g:registers_trim_whitespace = 1 option to trim the whitespace at the beginning and end of the registers, which is disabled by default

Fixed

  • Handle upper case register letters (#23)