Last active
February 22, 2018 14:41
-
-
Save srishanbhattarai/44bc1ce44ba0cfd11f43cc31b1720d02 to your computer and use it in GitHub Desktop.
Sane copy pasta - tmux 2.5 + neovim + terminal (tested on Alacritty/iTerm2)
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
# References: | |
# https://github.com/tmux/tmux/issues/543 | |
# https://github.com/tmux/tmux/issues/543#issuecomment-298193820 | |
# | |
# PREREQUISITE: | |
# ❯ brew install reattach-to-user-namespace --wrap-pbcopy-and-pbpaste | |
# Add the following snippet to your .tmux.conf - | |
setw -g mode-keys vi | |
set -g default-shell $SHELL | |
set -g default-command "reattach-to-user-namespace -l ${SHELL}" | |
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" | |
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" |
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
" In your .vimrc, or neovim's init.vim file: | |
" Add the following line - | |
set clipboard=unnamed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment