aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXu Cheng <xu-cheng@users.noreply.github.com>2017-06-15 15:15:56 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-06-15 09:15:56 +0200
commit6efe84af6813f853d3ef0a60a86b4caa020bc313 (patch)
tree524d578272169c34e08e491cc3959ee4afc95905
parent7918845215855814cf16b483fb0bec9cdad313d2 (diff)
downloadrneovim-6efe84af6813f853d3ef0a60a86b4caa020bc313.tar.gz
rneovim-6efe84af6813f853d3ef0a60a86b4caa020bc313.tar.bz2
rneovim-6efe84af6813f853d3ef0a60a86b4caa020bc313.zip
provider/clipboard: add tmux support (#6894)
-rw-r--r--runtime/autoload/provider/clipboard.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index a3210046b1..e15aa1f2bd 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -84,6 +84,12 @@ function! provider#clipboard#Executable() abort
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
return 'win32yank'
+ elseif exists('$TMUX') && executable('tmux')
+ let s:copy['+'] = 'tmux load-buffer -'
+ let s:paste['+'] = 'tmux save-buffer -'
+ let s:copy['*'] = s:copy['+']
+ let s:paste['*'] = s:paste['+']
+ return 'tmux'
endif
let s:err = 'clipboard: No clipboard tool available. :help clipboard'