Refactor tmux and set-clipboard detection

Move logic to `autoload/tmux.vim` to detect the `vim` is being run
inside a `tmux` sessions and if the `set-clipboard` option is enabled.
This cleans up adding the optional `oscyank.vim` plugin when needed.
This commit is contained in:
2020-12-10 18:07:24 +00:00
parent 76acb9cd90
commit c17f7ea0d9
3 changed files with 14 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ nnoremap <leader>tm :tabmove<Space>
" Clear search highlights
nnoremap <leader><Space> :nohlsearch<CR>
if g:use_osc52
if exists('loaded_oscyank')
noremap <leader>y :Oscyank<CR>
else
" System clipboard yank/put