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: make <Plug>(leap-forward) inclusive #231

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

Defaults: make <Plug>(leap-forward) inclusive #231

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

Comments

@ggandor
Copy link
Owner

ggandor commented Jun 6, 2024

Pro

The choice between inclusive/exclusive is kinda arbitrary; but some valid reasons for inclusive could be:

  • Consistency between Visual and Operator-pending mode (for example, to surround a given range, you should target the same pair in both modes).
  • Selecting till the end of the line would be no special case (ysX<space> instead of yvsX<space>).

Notes:

  • At this point, Sneak compatibility shouldn't matter much.

  • It's also arbitrary whether we follow / (exclusive) or ft (inclusive). I don't think there's more reason to conceptualize the bigram jump by Sneak/Leap as "/ with constraints", rather than "enhanced ft".

Con

  • Breaking change.

Related discussion: justinmk/vim-sneak#83.

There is also an interesting idea there: o_v = 2-char inclusive/exclusive switch (problem: surprising behavior, with no precedent, needs extra documentation)

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