Closed mawkler closed 1 month ago
Following up the discussion from https://github.com/jinh0/eyeliner.nvim/issues/46 here.
Here's what I've currently got with default_keymaps = false:
default_keymaps = false
local function eyeliner_move(key, forward) return function() require('eyeliner').highlight({ forward = forward }) return repeat_move['builtin_' .. key .. '_expr']() end end vim.keymap.set(nxo, 'f', eyeliner_move('f', true), opts) vim.keymap.set(nxo, 'F', eyeliner_move('F', false), opts) vim.keymap.set(nxo, 't', eyeliner_move('t', true), opts) vim.keymap.set(nxo, 'T', eyeliner_move('T', false), opts) vim.keymap.set(nxo, ';', repeat_move.repeat_last_move_next) vim.keymap.set(nxo, ',', repeat_move.repeat_last_move_previous)
What would be neat is if eyeliner exposed a function that creates a one-shot <Esc> mapping, or perhaps even if eyeliner.highlight created that mapping. And that key mapping gets cleared once <Esc> is pressed.
<Esc>
eyeliner.highlight
If I understand it correctly, @cosmicbuffalo has fixed the issue by using vim.on_key() in #61 ! Let me know if there's any issue!
vim.on_key()
Awesome! It seems to be working. Thank you @cosmicbuffalo!
Following up the discussion from https://github.com/jinh0/eyeliner.nvim/issues/46 here.
Here's what I've currently got with
default_keymaps = false
:What would be neat is if eyeliner exposed a function that creates a one-shot
<Esc>
mapping, or perhaps even ifeyeliner.highlight
created that mapping. And that key mapping gets cleared once<Esc>
is pressed.