leap.nvim icon indicating copy to clipboard operation
leap.nvim copied to clipboard

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

Open ggandor opened this issue 1 year ago • 0 comments

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: https://github.com/justinmk/vim-sneak/issues/83.

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

ggandor avatar Jun 06 '24 12:06 ggandor