Using vim-plug
Plug 'jmattaa/regedit.vim'
Using packer.nvim
use('jmattaa/regedit.vim')
Using lazy.nvim
--- in init.lua:
{
'jmattaa/regedit.vim'
}
--- in plugins/regedit.lua:
return {
'jmattaa/regedit.vim'
}
Use quickmark by typing :Regedit open<cr>
this will open a
buffer with all of your editable registers
To edit a specific register you can skip listing all the registers and searching through
by typing :Regedit <register>
for example :Regedit "
to edit the "
register and
Regedit c
to edit the c register
If you want to exit and not do anything press escape
twice. To see why twice see Expanding commands
If you are currently editing a register you can expand/execute commands which the output will become the register value.
For example:
:Regedit f
then press escape to get the execute:
and you can for example write
expand('%')
and you'll get the current buffer name in the f
register.
For more run the :help regedit.usage
command
To configure the prefix and open keys you can use a snippet that looks like this:
" unset the default mappings
" if you wan't to configure one or two keys you can skip this
call RegeditMappings.UnsetMappings()
" set prefix key
let Regedit.KeyPrefix = '<leader>v'
" set the key to open the buffer
" if this is a register it will be overriden
let Regedit.KeyOpen = '%'
let Regedit.KeyClear = '-'
" set our mappings
call RegeditMappings.SetMappings()
Place this in your after
folder. In vim you can place it in
.vim/after/plugin/regedit.vim
In neovim you can place it in nvim/after/plugin/regedit.vim
The keys that you can customize are:
Regedi.KeyPrefix
: The prefix key
Regedit.KeyOpen
: The key used to open the regedit buffer
Regedit.KeyClear
: The key used to clear all of the registers
Prefix key | 'r' |
Opening window | '-' |
Clear registers | '!' |
There is one main key in the regedit
default mappings that is the regedit
prefix key. By default this is <leader>r
which means to edit a certain
register you can use <prefix><register>
to edit your register.
There is also another key which is important for regedit and it is the
Regedit.KeyOpen
this is the key after the prefix
which will tell regedit
to open a buffer by default you can use <prefix>-
this will open the buffer
To change these see configure or run :help Regedit.mappings
The default keys you can use to navigate and handle the quickmaps window
Key | Action |
---|---|
q | Close the buffer list |
j | Move the cursor one line down |
k | Move the cursor one line up |
Enter | Edit the selected register |
/<searchterm> |
To search for a specific searchterm |
Move through and search in the buffer as if you'd in a normal vim buffer. The only thing is it's not modifiable.
Only one special key to quit the regedit
buffer press q
and you'll return to the previous open buffer
For more help you can find the full documentation in the regedit
docs by running :help regedit