-
Notifications
You must be signed in to change notification settings - Fork 137
Both f
-like and t
-like HopChar1
#82
Comments
Good call, I’ll add some modes to support those. There is a PR I need to review about that. |
With the new direction option implemented in #93 it is now getting even more confusing as to when a motion is inclusive or exclusive the character to Hop to...
|
Is it possible to make motion and operator have the same behavior? I would prefer operator performing like |
Shifted from using vim sneak, I'm looking forward to this also since it's big deal. At a minimum, I think the behavior must be consistent both in normal and operation-pending modes. Thanks :) |
@phaazon In hindsight, I agree with this suggestion of @hiberabyss above:
that is, even not exposing options to configure, hopefully the default operator is inclusive. HopChar1 actually is really potent, and could even be a powerful plugin on its own due to these advantages:
No reason to use the other variants actually (e.g. def foo():
print('foo')
def bar():
print('bar') If I need to yank that function, naturally I want to type this: def foo():
print('foo' so need to include the start char of next function ( I think setting it like |
Sneak aims to be consistent with the behaviour of the native search command ( Also, with
Particularly because you're coming from Sneak, you might be interested in this. TLDR, in my humble opinion, a feature like That said, I agree that the most useful arrangement would be if there would be two versions of |
@ggandor Thanks for your useful insights! I have this mappings actually, and just realized from you that it's called as " Backward motion, inclusive the current cursor
onoremap b vb
onoremap F vF
onoremap T vT I don't agree with this though. Typing
Will take a look into your |
@ggandor I tried your Horizontal Motion (jump to
|
So, for now I'll stick with noremap f :HopChar1<CR>
onoremap f v:HopChar1<CR> So, this is good enough for me now. |
Pardon me in advance for hijacking the thread, but I'm always eager to discuss these design issues, as I've been personally doing an awful lot of thinking on them.
Yeah In the following examples,
I agree with you that using On the other hand, any matches beyond that are probably easier to reach by Now, after this, there is this grey zone where Lightspeed really shines (no pun intended): And don't forget that, we're probably in
Already answered here :)
That's true, but that Also, keep in mind that if you use To conclude: indeed, there are some cases when |
@ggandor Isn't that counting will also have pause/cognitive load since you need to visually/mentally count the position of the target?
I'm curious, how do you propose yanking the entire
You might be right:
I have no plans of using
Actually, I'm still confused also on how to use your plugin, even when watching the pressed keys in your sample GIFs. Seems that some of the pressed keys have no relation to the transition key/target. Maybe I need to play with it more. Thanks also for these interesting points. At the end of the day, we all just want to have the best Vim/Neovim experience at all cost. hehe |
If you don't know it instantly, without thinking, then you shouldn't use count, for sure. I'm talking about the straightforward cases. If it's 2-3, not too distant, i.e. not several lines below, with a lot of stuff in-between, you don't have to count, you just "know".
"Full-inclusive" mode (soon to be re-branded as the bi-directional "x-mode") to the rescue:
That is curious,
That is a pity, but then feel free to raise an issue and ask questions there, so that we can improve the documentation. (Maybe this answer helps?)
Yep, thank you too. On that note, personally I think that simple intra-window navigation/operations are handled by Lightspeed in a superior, uniform, less cognitively tasking way now (of course, that's why I wrote it), and as a user I'd like to see Hop evolving more towards structural editing and/or complex motions, like https://github.com/mfussenegger/nvim-ts-hint-textobject, or selecting a range of lines for operations (as if using two |
@ggandor Yeah, this clarification here helps, especially this part:
I think you might want to emphasize that in the docs. I'm thinking though that you still need to look into the target label after typing the initial char, so there's also an slight pause, just like in For example, when jumping to HopChar1: lightspeed: Am I missing something? |
Yes, in themselves, But here are my more convincing reasons against relying on labeled
In short: Lightspeed's |
Thanks for all the in-depth discussion folks, really helped me work out exactly the behaviour I'm looking for in a plugin, and it's great to see so many performant and interesting options (easy motion, sneak, hop, lightspeed). I found @ggandor's railways vs jetpacks argument rather compelling, worth a read if you haven't already seen it. |
This allows to use Hop in either the `f` way or `t` way. This is mostly useful for operator-pending modes such as `y` and `d`. Relates to #82.
This allows to use Hop in either the `f` way or `t` way. This is mostly useful for operator-pending modes such as `y` and `d`. Relates to #82.
This is now implemented and part of the |
If you want to try it out, update your nightly version of Hop and simply pass the |
It's still inconsistent in the above ways. And the inclusive jump is neither UPD: Now this is being tracked at #191. |
@phaazon Could you reopen this or open a new issue? |
See ed30204 for my fix. The current behavior of the |
Now when
HopChar1
is used to move the cursor, it behaves likef
. WhenHopChar1
is used as an operator motion, it behaves liket
.I want to have two different commands, one always behaves like
f
and the other always behaves liket
.The text was updated successfully, but these errors were encountered: