You are not logged in.

#1 2018-09-03 23:02:36

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

[SOLVED] Too many cut buffers

I have 3 different cut buffers.
First is system 'primary selection', which put string to buffer with Ctrl+Ins and unput with Shift+Ins. Works globally.
Second is tmux cut buffer, which works only between tmux windows.
Third is vim cut buffer, wich works only between vim windows.
This is a little bit uncomfortable. Anybody knows how to configure that all programs use the same cut buffer?

Last edited by Kirill Bugaev (2018-09-04 02:31:09)

Offline

#2 2018-09-03 23:09:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Too many cut buffers

autocutsel


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-09-03 23:25:58

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [SOLVED] Too many cut buffers

jasonwryan, thanks for answer.
autocutsel merge system and vim copy/paste buffers, but tmux still have its own.

Last edited by Kirill Bugaev (2018-09-04 05:47:34)

Offline

#4 2018-09-03 23:29:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [SOLVED] Too many cut buffers

You can adjust your tmux.conf to send it's buffer to xsel or autocutsel.  And for terminological pedantism, none of these are the clipboard buffer.  That's yet another one that some gui (especially toolkit based) programs use.

Last edited by Trilby (2018-09-03 23:31:32)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-09-03 23:37:30

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [SOLVED] Too many cut buffers

Trilby wrote:

You can adjust your tmux.conf to send it's buffer to xsel or autocutsel.

Thanks, i will try.

Trilby wrote:

And for terminological pedantism, none of these are the clipboard buffer.  That's yet another one that some gui (especially toolkit based) programs use.

Sorry, lets name it copy/paste buffers.

Offline

#6 2018-09-04 00:05:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [SOLVED] Too many cut buffers

No need to apologize, I was noting it in case you were searching specifically for "clipboard" in web searches.  For X11, you are talking about the 'primary selection'.  For the other programs you list I think they all call theirs a variant of 'cut buffer'.  There is/can be a "clipboard selection" under X11 - but this is something different (this is what many toolkit based programs use for Ctrl-C/Ctrl-V behavior).

Last edited by Trilby (2018-09-04 00:06:24)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2018-09-04 00:52:07

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [SOLVED] Too many cut buffers

Trilby wrote:

No need to apologize, I was noting it in case you were searching specifically for "clipboard" in web searches.  For X11, you are talking about the 'primary selection'.  For the other programs you list I think they all call theirs a variant of 'cut buffer'.  There is/can be a "clipboard selection" under X11 - but this is something different (this is what many toolkit based programs use for Ctrl-C/Ctrl-V behavior).

Thanks for explanation.
I have configured tmux as described in Arch Wiki and add the following to .tmux.conf:

bind-key ] run "xsel -o | tmux load-buffer - ; tmux paste-buffer"

Also have changed .vimrc config, append following:

:set clipboard=unnamed

Not use autocutsel at all.
Everything works fine except one. When I yank in vim from other workplace only vim cut buffer changes and only on workplace where has been yanked.
I have changed firsit post accroding to Trilby remarks.

Last edited by Kirill Bugaev (2018-09-04 06:08:47)

Offline

Board footer

Powered by FluxBB