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

Restore cursor position after cancelling streak-mode #34

Closed
adambiggs opened this issue Dec 2, 2013 · 8 comments
Closed

Restore cursor position after cancelling streak-mode #34

adambiggs opened this issue Dec 2, 2013 · 8 comments

Comments

@adambiggs
Copy link

If you enter streak mode, press Tab, then exit without making a selection, the cursor stays at the position you tabbed to.

It would be more intuitive if the cursor jumped back to the original position before entering streak mode.

@justinmk
Copy link
Owner

justinmk commented Dec 2, 2013

So, return to the first match, or return to the original point of invocation?

@adambiggs
Copy link
Author

The original point of invocation.

@justinmk
Copy link
Owner

justinmk commented Dec 2, 2013

@adambiggs Ok, but what if the cursor is at the desired position after <tab>, and the user just wants to exit because of that?

Note that you can always return to the point of invocation via ctrl-o or `` (backtick backtick).

My feeling is that it is better to assume that if the user took some action (such as <tab>), the common case is that the action was intentional, so canceling it (by returning to the point of invocation) would usually be undesired.

Try it for a week and see if you still dislike the current behavior.

Thanks for the report!

@adambiggs
Copy link
Author

Ok, but what if the cursor is at the desired position after , and the user just wants to exit because of that?

Good point, maybe <Esc> could return to the point of invocation, and <Space>/<CR> could stay at the tab position?

Not a big deal either way, using Ctrl-o is completely fine.

Great work on this plugin! Only been using it for an hour, and already thinking of getting rid of EasyMotion.

@justinmk
Copy link
Owner

justinmk commented Dec 2, 2013

Glad you like it! There are still some rough edges with the "easymotion" mode, so if something sucks, it will probably be fixed soon.

Two things that cannot ever be fixed (except by patching Vim):

  • the screen turns black & white during streak mode
  • concealed characters are revealed during streak mode

This is because instead of temporarily editing the buffer (as easymotion does), streak-mode uses Vim's "conceal" feature, which is much faster (and it doesn't edit the text, which always bothered me about easymotion).

@adambiggs
Copy link
Author

the screen turns black & white during streak mode

Don't think this is a problem! EM does the same thing for text that contains navigation hooks, so usually more than half the screen is B&W when entering EM. Didn't even notice till you mentioned it :)

concealed characters are revealed during streak mode

Can you explain this a bit more? I don't notice this behaviour.

@justinmk
Copy link
Owner

justinmk commented Dec 3, 2013

concealed characters are revealed during streak mode

Can you explain this a bit more?

@adambiggs Try it in any help file to see the effect. I have an idea how it could be mitigated, but wanted to wait to see how much it really bothered anyone. Plus it could actually be regarded as a feature, since it makes it clear what characters are actually present in the text, which affects the match results.

@adambiggs
Copy link
Author

Ah I see what you mean now. Doesn't bother me! 🍔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants