fret.nvim is provides enhanced f/t mapping for Neovim.
Move the cursor to the desired character with fewer keystrokes.
In addition to the general f/t plugin behavior, it implements Related-mode.
It provides alternate keys to jump to related character.
- Related-mode is implemented
- Repeat-keys (
;
,
.
) are valid - Always ignores uppercase and lowercase letters
- Supports Kana-moji
- Beacon flashes when cursor jumps
- Smart fold(automatically open and close folding)
- Same key repeat
demo.mp4
Pressing a lowercase key allows you to perform short, repeated actions using the same key.
This feature is enabled when the g:fret_samekey_repeat
variable is set to 0 or greater.
g:fret_samekey_repeat
specifies the key acceptance time in milliseconds.
For specification reasons, it cannot be used in conjunction with the beacon function.
Warning
g:fret_samekey_timeout
was renamed to g:fret_samekey_repeat
and the value changed from an integer to a boolean
- Neovim >= 0.10.0
- lazy.nvim
{
'tar80/fret.nvim',
opts = {
...
},
}
mapkeys
field must be set to activate fret.nvim. Other fields are optional
require('fret').setup({
fret_timeout = 0,
fret_enable_beacon = false,
fret_enable_kana = false,
fret_enable_symbol = false,
fret_repeat_notify = false,
fret_samekey_repeat = false,
fret_smart_fold = false,
fret_hlmode = 'replace',
beacon_opts = {
hl = 'FretAlternative',
interval = 80,
blend = 20,
decay = 10
},
mapkeys = {
fret_f = 'f',
fret_F = 'F',
fret_t = 't',
fret_T = 'T',
},
altkeys = {
lshift = 'JKLUIOPNMHY',
rshift = 'FDSAREWQVCXZTGB',
},
})
- Now considers the conceal attribute
fret.nvim is inspired by vim-eft and fuzzy-motion.vim.
Check out these nice plugins.