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

Send text to other buffer #110

Open
cyruseuros opened this issue May 28, 2020 · 3 comments
Open

Send text to other buffer #110

cyruseuros opened this issue May 28, 2020 · 3 comments

Comments

@cyruseuros
Copy link

Tmux has set-buffer and paste-buffer commands for quickly sending text between windows. I was wondering if something similar was possible with dvtm without going through the editor using copy-mode, even if it means writing a small script to do it.

@luke-clifton
Copy link
Contributor

By modifying the commands field

static Cmd commands[] = {

And using the -c option to create a command fifo, this is possible.

@cyruseuros
Copy link
Author

I'm guessing this would be done using the send command? The thing is I'm not exactly sure how to use the selection from a shell script (when I don't actually have anything selected, but have the string I want to send stored as a variable).

Could you post an example of what I would need to echo into the fifo?

@GReagle
Copy link

GReagle commented May 20, 2021

Pasting in dvtm is very easy (Mod, p). I am guessing that you want copying certain text to be easier. In dvtm, you need to use your text editor to select the text that you want because dvtm puts the entire buffer into your editor. It could be very easy or very hard, depending on you and your editor. What editor do you use? I might be able to give you tips on making it easier.

I doubt that dvtm is going to be changed in how it does copying, but you never know.

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

3 participants