IngoMeyer441 / tmux-easy-motion

Vim's easy-motion for tmux
MIT License
81 stars 6 forks source link

Proposal: Start easymotion without motions. #4

Closed aca closed 3 years ago

aca commented 3 years ago

So happy with this plugin! Thanks!

There's many "movement" options for easymotion but I personally use only "word" movement (<Plug>(easymotion-overwin-w)).

I want to archive the same with this plugin. But it seems that I have to choose motion to get into the easymotion mode. <prefix> + <space> + w.

It would be great if I can set default motion and start easymotion mode with just <prefix> + <space>.

And also highlighting all words as https://github.com/IngoMeyer441/tmux-easy-motion/issues/2 mentioned.

IngoMeyer441 commented 3 years ago

Is added to my todo list. :wink:

IngoMeyer441 commented 3 years ago

However, it could be a bit tricky to implement a overwin motion because this plugin only uses one tmux pane currently.

aca commented 3 years ago

I fully understand. It would be just fine to be able to move inside pane. thx

123subhadeep commented 3 years ago

This is exactly what I was looking for as well, right now we always need to specify a motion, which has a couple of drawbacks:

  1. One extra keystroke
  2. Need to spend some mental effort: need to decide whether the word I am trying jump to, is above or below the cursor.

So it will be great if we can just mark all the words on the screen for jump on + (or some other configurable key)

I am basically looking for a single key stroke (excluding tmux prefix) equivalent of this easymotion jump :

<Plug>(easymotion-bd-w)

Btw, thanks for this great plugin. I have been looking for this feature in tmux forever.

aca commented 3 years ago

@123subhadeep For now you might want to try this key binding.

bind-key -T prefix w switch-client -T easy-motion\; run-shell -b "/Users/rok/.tmux/plugins/tmux-easy-motion/scripts/easy_motion.sh 'B'"
123subhadeep commented 3 years ago

@aca Thanks for the tip, it saved me a keystroke ! However, it only marks the words that are above the cursor. Do you know if there's a way to mark all the words on the screen ? Thanks again !

IngoMeyer441 commented 3 years ago

Sorry for the delay. I work on configurable key bindings and more motions (especially bidrectional motions), but currently I have not so much free time. I think in a few days I can push it to develop.

IngoMeyer441 commented 3 years ago

Commit 5776bd49280f68ed5437e14c9177bfe51751dacd adds bidirectional motions and commit 214802a09c0194c095d447f0bca5f03f0285921f a default motion. Now you can simply configure

set -g @easy-motion-default-motion "bd-w"

to highlight all words in both directions as soon as the easy motion prefix key is pressed. See the README for more details how key bindings can be configured.

IngoMeyer441 commented 3 years ago

I close this issue since I think it is fixed. Feel free to reopen.