0

I want select some string in visual mode (v) and send it to any external program (e.g. tmux send-keys)

I tried use xargs:

  1. switch to v (visual mode)
  2. select some words
  3. press : getting :'<,'>
  4. Write :'<,'>w ! xargs -I {} tmux send-keys -t:0 {}. Getting whole line passed to tmux

xargs works as expected.

But entire line is always passing instead of my selection.

0

Shell windows usually do not support selecting text on anything but the client side, meaning only your terminal window or SSH client will know that you have selected text. Therefore, you will likely be hard pressed to find something that can can tell BASH and contained programs what you have selected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.