nvim: after/plugin/mini: Use jump2d for f, F, t, T motions
mini.jump module does not give multiple hints when moving on the same line like hop use to. Use the jump2d module to achieve this functionality. This makes it easy to jump forward or backward on the same line with just one hop instead of having to press f/F multiple times which is just annoying and stupid.
This commit is contained in:
parent
0265000a4f
commit
9c9dc6a6b8
1 changed files with 15 additions and 2 deletions
|
@ -10,8 +10,6 @@ require('mini.align').setup({
|
|||
})
|
||||
-- Comment lines
|
||||
require('mini.comment').setup()
|
||||
-- For f, F, t, t motions/Horizontal movement
|
||||
require('mini.jump').setup({silent = true})
|
||||
-- Vertical jumps/movement
|
||||
require('mini.jump2d').setup({
|
||||
allowed_lines = {
|
||||
|
@ -67,3 +65,18 @@ remap({ 'n', 'o', 'x' }, 'gl', function()
|
|||
|
||||
return mini_jump2d.start(line_start)
|
||||
end, opts)
|
||||
-- Replacement for f, F, t, T motions/Horizontal movement
|
||||
remap({ 'n', 'o', 'x' }, 'f', function()
|
||||
local mini_jump2d = require('mini.jump2d')
|
||||
local single_char = mini_jump2d.builtin_opts.single_character
|
||||
|
||||
single_char.allowed_lines = {
|
||||
blank = false,
|
||||
cursor_before = false,
|
||||
cursor_at = true ,
|
||||
cursor_after = false,
|
||||
fold = false,
|
||||
}
|
||||
|
||||
return mini_jump2d.start(single_char)
|
||||
end, opts)
|
||||
|
|
Loading…
Reference in a new issue