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

Defaults: bidirectional leap for Normal mode (use <Plug>(leap)) #230

Open
ggandor opened this issue Jun 6, 2024 · 0 comments
Open

Defaults: bidirectional leap for Normal mode (use <Plug>(leap)) #230

ggandor opened this issue Jun 6, 2024 · 0 comments
Labels

Comments

@ggandor
Copy link
Owner

ggandor commented Jun 6, 2024

Pro

  • only one key used, comfort
  • prioritizing the current line did the trick, and IMO made the whole concept work; smart autojump (the default) is not fully deterministic anyway, even if the search is directional, you might have to use a label for the first target too
  • we lose only 1 bit of information (versus 8-10 in the pattern itself)
  • in Normal mode, as opposed to Visual and O-p mode, we're not interested in the target in relation to our current position, we just want to jump there

Con


An old discussion in the Sneak repo: justinmk/vim-sneak#62

Noise means ... there are twice as many target labels on average

True, bidirectional mode means more visual noise.

label-mode will invoke twice as often (fewer opportunities to jump to a single match and skip label-mode)

Right... (but as mentioned above, it's still only 1 bit of information we're losing, the pattern itself contains a lot more)

half as many labels available in the direction you want to go, which means more steps

With smart autojump (using an extended label set on demand), it's very rare to have additional steps, group switch is a truly exceptional case.

Also: which direction should bi-directional search go if all matches are off-screen?

Fortunately, not a problem here. Use /? for their intended purpose, that is, searching in the unknown, and Leap for jumping to on-screen positions.

You pay these costs every single time all for the convenience of occasionally being able to search backwards.

Yeah, but "occasionally" = 50%.

@ggandor ggandor pinned this issue Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant