Byobu / Tmux copy whole line

Multi tool use
I use byobu in tmux mode. In screen I can do this:
Ctrl+a [, move to line, Y, Ctrl+a ]
"Y" copys the whole line into the clipboard. I am looking to something similar in byobu in tmux mode. The only thing I found is:
Ctrl+a/b (depends on your setting) + [, move to line, 0, space, $, enter, Ctrl+a/b + ]
But I feel like that is a lot of hard to reach keystrokes, Y is much easier.
tmux gnu-screen byobu
add a comment |
I use byobu in tmux mode. In screen I can do this:
Ctrl+a [, move to line, Y, Ctrl+a ]
"Y" copys the whole line into the clipboard. I am looking to something similar in byobu in tmux mode. The only thing I found is:
Ctrl+a/b (depends on your setting) + [, move to line, 0, space, $, enter, Ctrl+a/b + ]
But I feel like that is a lot of hard to reach keystrokes, Y is much easier.
tmux gnu-screen byobu
add a comment |
I use byobu in tmux mode. In screen I can do this:
Ctrl+a [, move to line, Y, Ctrl+a ]
"Y" copys the whole line into the clipboard. I am looking to something similar in byobu in tmux mode. The only thing I found is:
Ctrl+a/b (depends on your setting) + [, move to line, 0, space, $, enter, Ctrl+a/b + ]
But I feel like that is a lot of hard to reach keystrokes, Y is much easier.
tmux gnu-screen byobu
I use byobu in tmux mode. In screen I can do this:
Ctrl+a [, move to line, Y, Ctrl+a ]
"Y" copys the whole line into the clipboard. I am looking to something similar in byobu in tmux mode. The only thing I found is:
Ctrl+a/b (depends on your setting) + [, move to line, 0, space, $, enter, Ctrl+a/b + ]
But I feel like that is a lot of hard to reach keystrokes, Y is much easier.
tmux gnu-screen byobu
tmux gnu-screen byobu
edited Aug 2 '17 at 16:10
terdon♦
129k32253428
129k32253428
asked Jul 25 '17 at 14:09
VedaVeda
1757
1757
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
A bit of an improvement: do space, V, enter
instead of 0, space, $, enter
. A single V is a lot easier to type than a 0 and a $. V is equivalent to vim's "do visual mode select of entire line" command.
I can't speak to byobu directly but since it's just fronting tmux, you could also bind a key to all this in native tmux. Something like this:
bind-key -r -T copy-mode-vi Y send-keys -X begin-selection ; send-keys -X select-line ; send-keys -X copy-selection
Then you just enter copy mode, go to the line you want to copy, press Y then Enter. The line will now be in the paste buffer. (While that's a bit long and ugly it does work for me.)
Edit: Tested with tmux 2.4
add a comment |
I have in my ~/.byobu/.tmux.conf
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
so normally I can enter in copy mode by:
Prefix + [
then I can use vi commands to navigate and enter vi select mode by 'v'
yank the selection by 'y'
after that I can put/paste in the terminal by:
Prefix + ]
In order to copy a line:
Prefix + [
navigate to the line
$ (jump to the end)
Left Arrow
v (begin-selection)
0 (jump to the start of the line)
y (yank and exit copy mode)
Prefix + ] (paste the line)
add a comment |
Because of newer Tmux version I had to change my config:
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection ; send-keys -X cancel
Thanks to 'rushiagr' (http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f381704%2fbyobu-tmux-copy-whole-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
A bit of an improvement: do space, V, enter
instead of 0, space, $, enter
. A single V is a lot easier to type than a 0 and a $. V is equivalent to vim's "do visual mode select of entire line" command.
I can't speak to byobu directly but since it's just fronting tmux, you could also bind a key to all this in native tmux. Something like this:
bind-key -r -T copy-mode-vi Y send-keys -X begin-selection ; send-keys -X select-line ; send-keys -X copy-selection
Then you just enter copy mode, go to the line you want to copy, press Y then Enter. The line will now be in the paste buffer. (While that's a bit long and ugly it does work for me.)
Edit: Tested with tmux 2.4
add a comment |
A bit of an improvement: do space, V, enter
instead of 0, space, $, enter
. A single V is a lot easier to type than a 0 and a $. V is equivalent to vim's "do visual mode select of entire line" command.
I can't speak to byobu directly but since it's just fronting tmux, you could also bind a key to all this in native tmux. Something like this:
bind-key -r -T copy-mode-vi Y send-keys -X begin-selection ; send-keys -X select-line ; send-keys -X copy-selection
Then you just enter copy mode, go to the line you want to copy, press Y then Enter. The line will now be in the paste buffer. (While that's a bit long and ugly it does work for me.)
Edit: Tested with tmux 2.4
add a comment |
A bit of an improvement: do space, V, enter
instead of 0, space, $, enter
. A single V is a lot easier to type than a 0 and a $. V is equivalent to vim's "do visual mode select of entire line" command.
I can't speak to byobu directly but since it's just fronting tmux, you could also bind a key to all this in native tmux. Something like this:
bind-key -r -T copy-mode-vi Y send-keys -X begin-selection ; send-keys -X select-line ; send-keys -X copy-selection
Then you just enter copy mode, go to the line you want to copy, press Y then Enter. The line will now be in the paste buffer. (While that's a bit long and ugly it does work for me.)
Edit: Tested with tmux 2.4
A bit of an improvement: do space, V, enter
instead of 0, space, $, enter
. A single V is a lot easier to type than a 0 and a $. V is equivalent to vim's "do visual mode select of entire line" command.
I can't speak to byobu directly but since it's just fronting tmux, you could also bind a key to all this in native tmux. Something like this:
bind-key -r -T copy-mode-vi Y send-keys -X begin-selection ; send-keys -X select-line ; send-keys -X copy-selection
Then you just enter copy mode, go to the line you want to copy, press Y then Enter. The line will now be in the paste buffer. (While that's a bit long and ugly it does work for me.)
Edit: Tested with tmux 2.4
edited Jul 25 '17 at 19:31
answered Jul 25 '17 at 14:32


B LayerB Layer
4,0241525
4,0241525
add a comment |
add a comment |
I have in my ~/.byobu/.tmux.conf
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
so normally I can enter in copy mode by:
Prefix + [
then I can use vi commands to navigate and enter vi select mode by 'v'
yank the selection by 'y'
after that I can put/paste in the terminal by:
Prefix + ]
In order to copy a line:
Prefix + [
navigate to the line
$ (jump to the end)
Left Arrow
v (begin-selection)
0 (jump to the start of the line)
y (yank and exit copy mode)
Prefix + ] (paste the line)
add a comment |
I have in my ~/.byobu/.tmux.conf
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
so normally I can enter in copy mode by:
Prefix + [
then I can use vi commands to navigate and enter vi select mode by 'v'
yank the selection by 'y'
after that I can put/paste in the terminal by:
Prefix + ]
In order to copy a line:
Prefix + [
navigate to the line
$ (jump to the end)
Left Arrow
v (begin-selection)
0 (jump to the start of the line)
y (yank and exit copy mode)
Prefix + ] (paste the line)
add a comment |
I have in my ~/.byobu/.tmux.conf
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
so normally I can enter in copy mode by:
Prefix + [
then I can use vi commands to navigate and enter vi select mode by 'v'
yank the selection by 'y'
after that I can put/paste in the terminal by:
Prefix + ]
In order to copy a line:
Prefix + [
navigate to the line
$ (jump to the end)
Left Arrow
v (begin-selection)
0 (jump to the start of the line)
y (yank and exit copy mode)
Prefix + ] (paste the line)
I have in my ~/.byobu/.tmux.conf
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
so normally I can enter in copy mode by:
Prefix + [
then I can use vi commands to navigate and enter vi select mode by 'v'
yank the selection by 'y'
after that I can put/paste in the terminal by:
Prefix + ]
In order to copy a line:
Prefix + [
navigate to the line
$ (jump to the end)
Left Arrow
v (begin-selection)
0 (jump to the start of the line)
y (yank and exit copy mode)
Prefix + ] (paste the line)
answered Nov 1 '18 at 8:54
ZoliZoli
11
11
add a comment |
add a comment |
Because of newer Tmux version I had to change my config:
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection ; send-keys -X cancel
Thanks to 'rushiagr' (http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu)
add a comment |
Because of newer Tmux version I had to change my config:
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection ; send-keys -X cancel
Thanks to 'rushiagr' (http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu)
add a comment |
Because of newer Tmux version I had to change my config:
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection ; send-keys -X cancel
Thanks to 'rushiagr' (http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu)
Because of newer Tmux version I had to change my config:
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection ; send-keys -X cancel
Thanks to 'rushiagr' (http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu)
answered 9 hours ago
ZoliZoli
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f381704%2fbyobu-tmux-copy-whole-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2TlIXuH6hya3,8ncg3yanBQ0JaPYGtlOg1D,Ym dpEnqaQAU4cYi,ozD4nC,fSMIMZ0Ieba2Rxk4Jx9BMV