tversteeg/registers.nvim

github github
register
star 466
stars
alert-circle 12
open issues
users 2
subscribers
git-branch 16
forks
CREATED

2021-02-11

UPDATED

last month


registers.nvim

Show register content when you try to access it in Neovim. Written in Lua.

Requires Neovim 0.4.4+.

Features

  • No configuration required, automatically maps to " and CtrlR
  • Non-obtrusive, won't influence you're workflow
  • Minimal interface, no visual noise

Use

The popup window showing the registers and their values can be opened in one of the following ways:

  • Call :Registers
  • Press " in normal or visual mode

normal

  • Press CtrlR in insert mode

insert

Empty registers are not shown by default.

Use the Up and Down or CtrlP and CtrlN or CtrlJ and CtrlK keys to select the register you want to use and press Enter to apply it, or type the register you want to apply, which is one of the following:

" 0-9 a-z : . % # = * + _ /

Install

Packer

use "tversteeg/registers.nvim"

Paq

paq "tversteeg/registers.nvim"

Plug

Plug 'tversteeg/registers.nvim', { 'branch': 'main' }

Dein

call dein#add('tversteeg/registers.nvim')

Configuration

return_symbol

Symbol shown for newline characters. The newline character "\n" is not allowed here.

Default

"โŽ"

Example

let g:registers_return_symbol = "\\n"

tab_symbol

Symbol shown for tab characters.

Default

"ยท"

Example

let g:registers_tab_symbol = "\t"

space_symbol

Symbol shown for space characters.

Default

" "

Example

let g:registers_space_symbol = "."

delay

Milliseconds to wait before opening the popup window.

Default

0

Example

let g:registers_delay = 500

register_key_sleep

Seconds to wait before closing the window when a register key is pressed.

Default

0

Example

let g:registers_register_key_sleep = 1

show_empty_registers

An additional line with the registers without content.

Default

1

Example

let g:registers_show_empty_registers = 0

trim_whitespace

Don't show whitespace at the begin and end of the registers.

Default

1

Example

let g:registers_trim_whitespace = 0

hide_only_whitespace

Don't show registers filled exclusively with whitespace.

Default

0

Example

let g:registers_hide_only_whitespace = 1

window_border

Requires Neovim 0.5.0+.

Can be "none", "single", "double", "rounded", "solid", or "shadow".

Default

"none"

Example

let g:registers_window_border = "single"

window_min_height

Minimum height of the window when there is the cursor at the bottom.

Default

3

Example

let g:registers_window_min_height = 10

window_max_width

Maximum width of the window.

Default

100

Example

let g:registers_window_max_width = 20

normal_mode

Open the window in normal mode.

Default

1

Example

let g:registers_normal_mode = 0

paste_in_normal_mode

Automatically perform a paste action when selecting a register through any means in normal mode.

Default

0

Options

  • 0 - Default Neovim behavior.
  • 1 - Paste when selecting a register with the register key and Return.
  • 2 - Paste when selecting a register only with Return.

Example

let g:registers_paste_in_normal_mode = 1

visual_mode

Open the window in visual mode.

Default

1

Example

let g:registers_visual_mode = 0

insert_mode

Open the window in insert mode.

Default

1

Example

let g:registers_insert_mode = 0

show

Which registers to show and in what order.

Default

"*+\"-/_=#%.0123456789abcdefghijklmnopqrstuvwxyz:"

Example

let g:registers_show = "*+\""

System clipboard

Transfer selected register to system clipboard.

Default

0

Example

let g:system_clip = 1