Skip to content

tar80/fret.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎸fret.nvim

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.

Features

  • 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

New feature Same-Key-Repeat function is now available

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

demo_samekey_repeat

Requirements

  • Neovim >= 0.10.0

Installation

  • lazy.nvim
{
  'tar80/fret.nvim',
  opts = {
    ...
  },
}

Configuration

  • 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',
  },
})

Known issues

  • Now considers the conceal attribute

Credits

fret.nvim is inspired by vim-eft and fuzzy-motion.vim.
Check out these nice plugins.

About

Brilliant horizontal cursor movement

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages