Skip to content
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

Quick-scope mode #4

Closed
Mte90 opened this issue Feb 9, 2021 · 11 comments
Closed

Quick-scope mode #4

Mte90 opened this issue Feb 9, 2021 · 11 comments
Labels
feature Feature request. later To do later.

Comments

@Mte90
Copy link

Mte90 commented Feb 9, 2021

I use https://github.com/unblevable/quick-scope this one doesn't change the letters to move to a word but use the same so it is more easy to move there.

It is possible to replicate this behaviour?

@hadronized
Copy link
Owner

It can be an interesting mode indeed. How does it behave with words starting with the same letters?

@Mte90
Copy link
Author

Mte90 commented Feb 10, 2021

If there are those cases you have to press multiple times that letter to move it where you want.
I think that is acceptable as it is more easy to understand.

@hadronized
Copy link
Owner

And it only does so for the current line, right?

@Mte90
Copy link
Author

Mte90 commented Feb 10, 2021

yes just for the current line

@hadronized hadronized added the feature Feature request. label Feb 12, 2021
@hadronized
Copy link
Owner

Okay, can we review this feature request? I just saw someone on a stream using quick scope (the real one), and I’m confused. It’s just a helper feature, right? It just basically shows you the next character you can jump to, right?

@Mte90
Copy link
Author

Mte90 commented Mar 22, 2021

Yes so it is more simple to do that, as vim has too many hotkeys is just an hint to help on that.

@Kyran-C
Copy link
Contributor

Kyran-C commented Mar 23, 2021

Quick-scope is just an f/t helper that highlights the first unique character in each word so you can jump to it without having to repeat the motion. I think the two plugins have distinct feature sets.

  • Hop will put you precisely where you want to be as long as you're willing to spend a few keystrokes to get there; typically around 4 for most modes.
  • Quick-scope sacrifices accuracy in exchange for only needing 2 keystrokes to get to the word (for instance if you're doing ciw it doesn't really matter where you land exactly)

The only overlap I could see would be a mode where upon pressing the equivalent of f/t it would highlight each word, but using legend keys at the start of the word rather than finding the first unique character in the line. Then you'd get the speed benefit of only 2 stroke movement, but also with the accuracy of landing at the beginning of the word.

Of course, what I'm describing basically already exists in the :HopWord mode, except it works for the whole file. The only remaining feature of quick-scope is the ability to have it highlight the current line before you even press f/t. You can just look where you wanna go and then fire off fx without having to pause to read the second character. Doing this the Hop way is impossible though, since it's replacing the letters with something else. There's no way to have that be a permanent mode unless you wanna read garbled gibberish.

I'd recommend just using the :HopWord mode. It's more precise, equally as efficient for local movements, and works across all lines rather than just the current one. It's become my default movement now for almost everything. Quick-scope can live alongside it if you really want the always-on hints for f/t, but I always found that distracting anyway so I uninstalled it.

@hadronized
Copy link
Owner

For now, I want to focus on fixing bugs and stabilizing the plugin as much as possible, so I don’t plan on working on that for now. There are a bunch of PRs I want to review and focus on (some adding new modes). I’m not ruling this out but I wanted to reach out to explain that I’m not going to work on this soon.

@hadronized hadronized added the later To do later. label Jun 1, 2021
@hadronized
Copy link
Owner

Okay, after reading that again, I don’t think Hop is going to move into that direction. It looks like the closest thing to this would be https://github.com/ggandor/lightspeed.nvim.

@Mte90
Copy link
Author

Mte90 commented Nov 5, 2021

Seems that few days ago a similar plugin had the same features of quickscope and on reddit other people asked for that feature: https://www.reddit.com/r/neovim/comments/qk8ly8/plugin_ftftnvim_a_pure_lua_plugin_that_gives/

Just in case for others looking for an alternative.

@ggandor
Copy link

ggandor commented Nov 6, 2021

Okay, after reading that again, I don’t think Hop is going to move into that direction. It looks like the closest thing to this would be https://github.com/ggandor/lightspeed.nvim.

Well, yeah, we highlight unique characters, but only after initiating a search, and the aim is to provide feedback ("do not continue with the pattern, it's enough!"), so it's for a different purpose. I think quick-scope's method is a flawed idea that is actually counterproductive in practice. Someone asked for the same thing for Lightspeed a couple of months ago, and I described to them why that is out of the question.

afterlook pushed a commit to afterlook/hop.nvim that referenced this issue Sep 10, 2023
feat: add new commands for hopping camel case words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request. later To do later.
Projects
None yet
Development

No branches or pull requests

4 participants