hop.nvim
hop.nvim copied to clipboard
Add option to preserve cursor column when changing lines
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.)
Hey that’s a funny mode! That’s definitely doable! I’d rather merge #123 first so that implementing those modes get trivial.
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.