Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Add option to preserve cursor column when changing lines #125

Open
BlueDrink9 opened this issue Jul 19, 2021 · 2 comments
Open

Add option to preserve cursor column when changing lines #125

BlueDrink9 opened this issue Jul 19, 2021 · 2 comments
Labels
feature Feature request.

Comments

@BlueDrink9
Copy link

EasyMotion has a setup to replace hjkl. This includes a setting that means when you jump to another line, the current column your cursor is in is used for the jump, if possible. It would be great to have this feature in hop.

(As an aside, if you can suggest a pattern that I can use with HintPattern that matches the behavior for the above linked h and l, I'd appreciate the help. EasyMotion seems to be much more flexible with what counts as a word boundary than hop, which makes it much more useful.)

@hadronized
Copy link
Owner

Hey that’s a funny mode! That’s definitely doable! I’d rather merge #123 first so that implementing those modes get trivial.

@hadronized
Copy link
Owner

Just for the context, preserving the column is easily implementable with an option opts.preserve_column by overriding the jump target’s column with the one at the cursor before the jump.

I think it’s sane to authorize this whatever the command (even cross-windows). If anyone wants to try a patch, I’d be happy to review it. Otherwise I should have time to implement that in the incoming days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature request.
Projects
None yet
Development

No branches or pull requests

2 participants