Comments (5)
You don't need reattach-to-user-namespace
as of tmux 2.6
from .tmux.
Hello @waldauf 👋
You can add this to your .local
customization file:
bind -T copy-mode-vi y send -X copy-selection-no-clear #!important
But after I tested it, even though I set tmux_conf_copy_to_os_clipboard=false
, what I copy into tmux buffer is still synced with my OS clipboard and I need to investigate why it's the case with a recent tmux.
from .tmux.
Tmux has evolved a lot and according to https://github.com/tmux/tmux/wiki/Clipboard it depends on many factors whether it's going to copy to the OS clipoard.
from .tmux.
Hi @gpakosz !
Thank You for Your help. I dived more deeply into it and played with the setting and found this magic configuration which enables me:
- Stay in copy-mode after copy text, including mouse text marking.
y
copies to Tmux register.Enter
copies to the system clipboard.
Configuration part in .local
:
tmux_conf_copy_to_os_clipboard=true
~
###
# Prevent TMUX to leave copy-mode after copying selected text
###
# https://www.fosslinux.com/105809/tmux-copy-paste-mode-tips-and-tricks-for-productivity.htm#block-4
set-option -g default-command "reattach-to-user-namespace -l zsh"
# https://www.reddit.com/r/tmux/comments/v73005/how_to_prevent_tmux_from_exiting_copy_mode_after/
# https://unix.stackexchange.com/questions/639288/retain-selection-highlight-after-copying-text-to-clipboard-in-tmux
bind -T copy-mode-vi y send -X copy-selection-no-clear
bind-key -Tcopy-mode-vi Enter send -X copy-selection-no-clear
bind-key -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear
from .tmux.
Now I verified that it doesn't work according to my wish. Everything is also stored in the system clipboard. I hope my future-self will fix it. :D
You don't need reattach-to-user-namespace as of tmux 2.6
I have to run on MacOS and there was a problem without reattach-to-user-namespace
. Will try it again without.
from .tmux.
Related Issues (20)
- .tmux/plugins is deleted on tmux start - Ubuntu 23.10 HOT 2
- Why is the status bar always a little further from the bottom? HOT 3
- Styling breaks since 7e00233 HOT 9
- Why first tmux start for plugins is so slow? HOT 8
- Mouse selection on tmux not being copied over to os clipboard on fedora wayland HOT 7
- Consider renaming `.tmux.conf.local` to `.tmux.config.local.example` HOT 5
- When using nix sysctl on MacOS, the '-q' option is not available causing the uptime display to be broken HOT 6
- Show ssh hostname in choose-tree for pane
- SSH Hostname Not Displayed Correctly on Status Right/Left HOT 9
- tmux uses wl-copy instead of xclip/xsel in X11 environment HOT 5
- tmux 3.4-1 prints weird characters on every startup HOT 3
- conflict with vim < C-b >? HOT 4
- copy mode is trippin with mouse HOT 4
- `tmux_conf_battery_bar_palette="#xxxxxx,#yyyyyy,#zzzzzz"` seems broken HOT 4
- What is the recommended way to do theme customization? HOT 2
- When using {battery_vbar} or {battery_hbar}, the battery status display does not take effect. HOT 1
- Changing prefix to <C-s> works but <C-a> continues to be another prefix even after unbind HOT 1
- Question: Change bg color of status bar if prefix is active HOT 2
- unable to work with nvim-osc52 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from .tmux.