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

Small tweak proposal to dramatically improve jumping #44

Open
chenglou opened this issue Feb 21, 2014 · 2 comments
Open

Small tweak proposal to dramatically improve jumping #44

chenglou opened this issue Feb 21, 2014 · 2 comments

Comments

@chenglou
Copy link

Example case: wwww

  • Cursor after the second w, jump to w gives cawb.
  • Cursor at the end, jump to w gives dcba.

For the first case, not sure how related this is to #43, but I think a better behavior would be to highlight the third w too, as to produce cabd. The current behavior is inconsistent since for preceding ws, it highlights all of them and for following ws, it skips the first.

For the second case, I propose the behavior to become geca, aka skipping letters as if there were more ws to come afterward. This will now render jumping predictable: jump a always go to the first previous occurrence, jump b always go to first next, jump c goes to second previous occurrence, etc.

This opens up possibilities for devs to visually remap their keyboard for jumping. For example, I can configure my setup such that f d s a jumps to 1 2 3 4 previous w respectively, and j k l ; jump to next.

@tednaleid
Copy link
Owner

For the first case, it's sort of related to #43 and is mostly because easymotion was really designed for vim mode and insert mode (implemented for ST2 in #43) is sort of a late addition. In vim mode the current letter is highlighted and it doesn't make sense to have it as a jump target.

Though even in insert mode, I wouldn't think that you'd want to highlight it as you're hitting 4 keystrokes for what should just be a right arrow keystroke.

Easy motion isn't really designed for finding things right in the same place as your cursor already is, there are better keystrokes for dealing with the current cursor position and the next/previous word.

For the second case, I think this kind of fits in the same situation. If you can count the number of characters of that type that are between you and your key, you're spending too much time counting characters :).

The way I use easy motion is to not even really be aware where my cursor currently is. I just stare at the letter that I want to go to, hit the easymotion combo to highlight that letter, see it change to the jump target and go. I don't need to keep any other state in my head other than what's I'm looking at.

@chenglou
Copy link
Author

The highlighting of the first case is really to complement the second case. Mapping it to the fdsajkl; layout makes it so that you wouldn't have to check the letter before jumping to it. I'm a light ST vim mode user and I try to cut down commands as much as I can; jump w a can really replace vim's F w for me (jump is one key for me too)

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