-
Notifications
You must be signed in to change notification settings - Fork 15
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
feature: highlight_on_key = true breaks clever-f.vim #11
Comments
Hey @squishram , thanks for the issue! clever-f.vim is most likely broken since I forgot to check for previous mappings of f,F,t,T, which means that I am currently overriding any mappings you had. I'll make a fix ASAP :) |
Hey @squishram sorry for taking so long! The issue seems a lot more complicated than I thought... turns out other plugins have the same issue, since all these plugins override the same f/F/t/T keys. like
If you are talking about pressing f/F/t/T as a replacement for repeats with If you're talking about how clever-f allows you to press |
No worries at all! I really appreciate you looking into it. I found
This is what I was talking about - I think it's an awesome feature, as adding 2 new keys (;,) to your roster, without having to map new things to
You're absolutely right, there are no real use-cases for such a feature at all. Thanks again for your great work! :) |
Possibly related is that I found that this plugin broke abbreviations and macros using |
Hey @samhh , are you talking about if you have highlights only turned on on pressing f? Or do you mean the default mode? I'm not sure if this will help, but I was thinking I could give the option for users to map "f" with commands to interact with eyeliner.nvim . Maybe that'll give more flexibility with working with macros and the like. So you could just remap f/F/t/T at your liking,
with whatever customizations you would want. (Also, I've been busy in my personal life, but I am hoping to be more active developing this plugin in the future.) |
I came here exactly for this request. I don't mind moving multiple lines so much, but being able to repeat with more |
Hi everyone, I know it's been more than a year since I've actively been developing this plugin, but I've finally come up with a solution which I think is perfect! It is now live in the latest commit of eyeliner df1a5c8 ! The New FeatureI've exposed the function in eyeliner that highlights the line, so that it can be integrated with other plugins like clever-f.vim. Here's how: First, you need these two config options: require("eyeliner").setup({
highlight_on_key = true,
default_keymaps = false -- this will disable eyeliner from hijacking the f/F/t/T keymaps
}) Then, you can use the highlight function from eyeliner freely: require("eyeliner.on-key").highlight({ forward = true }) -- { forward = false } to go backwards (for F/T motions) Integration with clever-f.vimFor example, to integrate with clever-f.vim, you can set it up as: {
"rhysd/clever-f.vim",
dependencies = {"eyeliner.nvim"},
init = function()
vim.g.clever_f_not_overwrites_standard_mappings = 1
vim.keymap.set(
{"n", "x", "o"},
"f",
function()
require("eyeliner.on-key").highlight({ forward = true })
return "<Plug>(clever-f-f)"
end,
{expr = true}
)
end
} Thanks everyone for your feedback, I'm sorry it took so long! Let me know if there's any problems, I'll reopen this issue! EDIT: I've added this information to the README.md |
Hi there! Love eyeliner, it's really useful, and fantastic job adding the 'highlight_on_key' feature, it takes some of the visual load off of staring at code all day - so thanks for your work.
I also use clever-f.vim, which allows f, t to replace ; repeat and F, T to replace , repeat, and allows letter searches to traverse multiple lines. This is essential for me as I can then remap ; and , to other uses. Unfortunately, clever-f is broken by {highlight_on_key = true}.
This is kind of a (potentially difficult) feature request - are there any plans for eyeliner.nvim to add the possibility of clever-f functionality? It seems like it'd be a fantastic & complementary accompanying module. Cheers!
The text was updated successfully, but these errors were encountered: