-
Notifications
You must be signed in to change notification settings - Fork 222
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
Beta-testing 'mini.jump2d' #74
Comments
I came to this from |
That is great to here, hope you'll like it! My initial idea was something along the lines "I want to jump to any non-whitespace in a matter of couple of keystrokes". So when after implementation, it felt unusable (or, at least, needing much time to get used to). The reason for me was that I immediately lost the place where I wanted to jump. Looked cool though! You can try this with So after trial and error I figured that I very rarely needed to jump inside word between letters. Usually it is "jump to word -> replace whole word". But jumping to place near punctuation or start of capital letter is quite frequent in programming. Thus was the default spotter born. |
One thing could be changed, default labels : |
Thanks! Yeah, I thought about that. And while those might be "ergonomic mechanically" they don't feel "ergonomic mentally" to me. It seems more intuitive to have "a" at start and "z" at end, albeit maybe slightly worse to type. And also this won't have the same effect as in 'hop.nvim' because labels are computed not around cursor, so any label is more or less equally possible on first step. But they are customizable, so don't think this should matter much. |
I was trying initially to migrate from hop, but unfortunately y1 yank motion was broken. In addition, I am using https://github.com/rcarriga/nvim-notify, and the vim.notify messages are very noisy. It would be great to be able to disable this notifications somehow |
Thanks for the feedback!
|
I will try to reproduce this problem and make an separate issue for that once I find the time |
Hi @echasnovski i was recently trying to implement repeat functionality in my custom Text Object. Turns out u have to use vim-repeat plug to make it work, and here is my sollution: |
First, in order for custom textobject to support dot-repeat, you usually don't have to use 'tpope/vim-repeat'. 'mini.nvim' has several text objects and motions, all of them support dot-repeatability out of the box. Usually it is a matter of making a correct mapping for using it. Situations might be different, but you can try to look at source code of 'mini.comment' (starting from here) or 'mini.indentscope' (starting from here). Second, jumps in 'mini.jump' are fully dot-repeatable: typing Third, jumps in 'mini.jump2d' are dot-repeatable to the extent I currently see reasonable: |
@BenjaminKern, I stopped using |
Awesome, thanks |
Maybe a quick feedback after using jump2d for a couple of days. I am often in the situation, where i need to jump 3-4 times to get to the location, where I want, while with hop it usually takes two jumps. I have a feeling that this happens when I want to jump to a location that is not so far away. |
Thanks for the feedback, it really helps! I presume you mean "keystrokes" instead of "jumps" here. Well, yeah, that is one of the intentional main differences between of 'hop.nvim' and 'mini.jump2d'. Former computes labels with algorithm involving cursor position, latter - doesn't. And so it takes roughly a uniform amount of keystrokes to get to any allowed spot instead of "fewer near cursor". (Also, is this an estimate for the same allowed jump spots? Like both "word starts in current window" or "default 'mini.jump2d' and some specific command in 'hop.nvim'"?). When I tried 'hop.nvim', for some reason this asymmetry in label computation was a deal breaker to try and write 'mini.jump2d'. Besides, found using this type of jumping usually to go relatively far enough from current cursor position (otherwise using builtin motions), so 'mini.jump2d' is usually narrowing allowed spots somewhat quicker. |
Yes, you correctly interpreted what I meant, with jumps I meant keystrokes. I guess, I got used to the way hop works, so for me I am most often moving around near the current position of the cursor. But as you clearly stated, it is ok to have a different focus for jump2d, it is a valid use case to expect uniformity in the number of keystrokes. You cannot make everybody happy, otherwise it wouldn‘t be „mini“ anymore |
With 0.4.0 release, 'mini.jump2d' is no longer in beta-testing. Thank you all for your input! |
Please leave your feedback about new 'mini.jump2d' module here. Feel free to either add new comment or positively upvote existing one.
Some things that I am interested to find out (obviously, besides bugs):
The text was updated successfully, but these errors were encountered: