aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
Diffstat (limited to '%HOME%')
-rw-r--r--%HOME%/.tmux.conf13
1 files changed, 11 insertions, 2 deletions
diff --git a/%HOME%/.tmux.conf b/%HOME%/.tmux.conf
index b4211b8..3f8bf74 100644
--- a/%HOME%/.tmux.conf
+++ b/%HOME%/.tmux.conf
@@ -73,7 +73,6 @@ bind -n M-8 select-pane -t 8
bind -n M-9 select-pane -t 9
bind -n M-0 select-pane -t 0
-# Not quite so quick, but still OK.
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
@@ -94,6 +93,13 @@ bind-key -T copy-mode-vi v send -X begin-selection
# Using the system clipboard.
+# y to copy to the system clipboard.
+# Y to immediately insert in the current pane.
+# M-y is y and Y combined.
+# ! to copy excluding line endings (most useful for one-line selections).
+
+# 1. Cygwin
+
if-shell 'uname | grep -q -F CYGWIN' {
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'cat > /dev/clipboard'
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel 'tmux paste-buffer'
@@ -107,8 +113,11 @@ if-shell 'uname | grep -q -F CYGWIN' {
bind-key ] run 'cat /dev/clipboard | tmux load-buffer - && tmux paste-buffer'
}
+# 2. Linux
+
+# Depends on xsel.
# The simple `xsel -i --clipboard` doesn't work, but `xsel -i -p && xsel -o -p
-# | xsel -i -b`, described in [1] does. How fun!
+# | xsel -i -b` [1] does. How fun!
if-shell 'uname | grep -q -F Linux && which xsel' {
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'