Created
May 26, 2023 11:50
-
-
Save jstaursky/4b9fb81e485839724ea5c2c4e5552ea2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .tmux.conf | |
# | |
# hit C-a as the special tmux prefix then [ for visual mode. | |
# hit v and use the hjkl keys to select text you want to copy and then hit y to copy the selected text. | |
# The copied text will be available to the system clipboard. | |
# | |
# NOTE for copying to system clipboard xclip must be installed. | |
# | |
set -g status off | |
# Set the prefix to Ctrl+a | |
set -g prefix C-a | |
set -s copy-command 'xclip -i' | |
# Remove the old prefix | |
unbind C-b | |
# Send Ctrl+a to applications by pressing it twice | |
bind C-a send-prefix | |
# Enable mouse | |
set -g mouse | |
# vi mode | |
setw -g mode-keys vi | |
bind -T copy-mode-vi v send -X begin-selection | |
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel | |
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' | |
bind P paste-buffer | |
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment