-
Notifications
You must be signed in to change notification settings - Fork 51
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
Can you add / search for text and jump to links like Vimium does #84
Comments
It's absolutely possible in sVim. Feel free to implement it. |
Hey @luchenyuxx Just wanted to ask if there was any update on this feature. 🙂 I looked at sVim code and don't even know where to start adding support for this. 😞 |
Hello @nikitavoloboev, |
Hey @luchenyuxx Did you by chance have any time to look at this? I can understand how I can map |
Hey @luchenyuxx. Can you guide me on how I can make this change. This is literally the only thing I wish existed in sVim that it currently doesn't do. 😞 Thank you. |
@nikitavoloboev Sorry for the late response. Sure, I can try to write a Contributing.md. |
A great feature!👍 |
@nikitavoloboev did you end up with working code for Thanks! |
I just switched back to safari, from Firefox, which I switched to from Chrome, where I first started using Vimium and I must say that /search is the most essential part of Vimium. I am going to try to implement this myself though I have no real clue where to start, but the trial and error is half the fun. :) If anyone has successfully implemented this, it would deeply appreciated if you could post the code here for reference! |
BTW in Vimium there is even more advanced feature for this – filtered hints. Instead of using full-text search to target links (which is sometimes inconvinient because it would hit non-links text as well) it changes the way link navigation mode (f key) operates. Instead of adding arbitrary labels to links it uses link's text itself to filter and navigate to target link. Firefox has a similar feature built-in – called 'Quick Find Link' (' key) Now that is a feature I would absolutely love to have in sVim as well. I find it the best option for mouseless links navigation. |
For those who care, I found a minimal way to do this without
To make Step 3 work, I use the PageExtender.app safari extension so that // Press Escape to focus a highlighted link
window.addEventListener('keypress', e => {
if (e.key == "Escape") {
const sel = window.getSelection()
const node = sel?.anchorNode?.parentNode
if (node?.tagName.toLowerCase() == 'a') {
e.preventDefault()
sel.removeAllRanges()
node.focus()
}
}
}) |
It would be really amazing if you could press
/
key and a vim like search prompt opens. Jumping to a text that is a hyperlink will then let you pressreturn
on it to go to the link.Vimium does it this way and its really useful. Is this possible to do in sVim? I am willing to try and add this feature if it is possible. Thank you.
The text was updated successfully, but these errors were encountered: