brew install vim tmux reattach-to-user-namespace
Created
December 3, 2012 20:47
-
-
Save stephenmckinney/4197891 to your computer and use it in GitHub Desktop.
Vim + Tmux + Mac OS X Clipboard (pbcopy) integration
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
# Mac OS X clipboard integration | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
# Optional keybindings: Enter Copy-mode and Copy and Paste sorta like Vim. | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind -t vi-copy 'v' begin-selection | |
bind -t vi-copy 'y' copy-selection | |
bind -t vi-copy Escape cancel |
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
" Mac OS X clipboard integration | |
nmap <F1> :set paste<CR>:r !pbpaste<CR>:set nopaste<CR> | |
vmap <F2> :w !pbcopy<CR><CR> |
Thanks for this. How about mouse selection support?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for sharing this.