-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Flash remains active after {action}{motion — 't'/'T', 'f/F'}
is completed
#6
Comments
That's on purpose. When moving, changing buffers, pressing |
{action}{motion — 't'/'T', 'f/F'}
is completed
Is there any way this could be made a configurable option? I frequently use |
Also found this a bit annoying. For example if you do something like edit: also it appears that ESC does not clear the highlights from 'f' highlight mode, which definitely doesn't help |
I'll make it configurable. To repeat a delete, use @triorph highlights should clear on |
Flash now hides when yanking with an ftFT motion |
@folke as far as I can see that feature only applies to "yank" operation. Is it possible to make it work with "delete" as well? |
🤦 yeah I was mapping to something else. My bad. I think I agree with rasulomaroff though that it'd be nice to change this behaviour for |
This is now configurable. While you're at it, I also invite everyone to try the new ftFT smart label mode :) opts = {
modes = {
char = {
jump_labels = function(motion)
-- never show jump labels by default
-- return false
-- Always show jump labels for ftFT
return vim.v.count == 0 and motion:find("[ftFT]")
-- Show jump labels for ftFT in operator-pending mode
-- return vim.v.count == 0 and motion:find("[ftFT]") and vim.fn.mode(true):find("o")
end,
},
},
}, It combines ftFT searches with labels. You can still navigate clever-f style or use It pretty much combines the best of both worlds :) Let me know what you think! |
@folke I think I'm gonna need to take some days off to configure flash for me 🤣 This gets it work as expected: autohide = function(motion)
-- autohide flash when the operator is `y` or `d`
return vim.fn.mode(true):find 'no' and (vim.v.operator == 'y' or vim.v.operator == 'd')
end About jump_labels - I've tried and I like it! But I wonder why label.after not working there :) I would like to put a label right after the symbol I'm searching for. Here's my config for the char mode: char = {
autohide = function(motion)
-- autohide flash when the operator is `y` or `d`
return vim.fn.mode(true):find 'no' and (vim.v.operator == 'y' or vim.v.operator == 'd')
end,
jump_labels = function(motion)
return vim.v.count == 0 and motion:find '[ftFT]' and vim.fn.mode(true):find 'o'
end,
label = { exclude = 'iardc', after = { 0, 1 } },
} |
Hi @rasulomaroff did you find a solution about the labels being shown after the symbol that you're searching for? |
@dpetka2001 not really. Just checked it, still not applied. But should it at all? I'm not sure about that, but would be nice to have 🙂 |
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.1
Operating system/version
MacOS 12.2.1
Describe the bug
When using
{action}{motion — 't'/'T', 'f/F'}
— eg. yank until opening parenthesesyt(
, flash.nvim remains active after motion is completed.Steps To Reproduce
yt,
Expected Behavior
When using
{action}{motion — 't'/'T', 'f/F'}
, flash.nvim is not active after motion is completed.Repro
The text was updated successfully, but these errors were encountered: