1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-15 15:19:27 +08:00
SpaceVim/autoload/SpaceVim/health/clipboard.vim
2022-03-27 13:38:54 +08:00

35 lines
1.3 KiB
VimL

"=============================================================================
" clipboard.vim --- SpaceVim clipboard checker
" Copyright (c) 2016-2022 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
function! SpaceVim#health#clipboard#check() abort
let result = ['SpaceVim clipboard support check report:']
call add(result, 'Checking +clipboard:')
if has('nvim')
if has('clipboard')
call add(result, ' SUCCEED!')
else
call add(result, ' Failed : to support +clipboard, you need has one of following clipboard tools in your $PATH:')
call add(result, ' 1. xclip')
call add(result, ' 2. xsel')
call add(result, ' 3. pbcopy/pbpaste (Mac OS X)')
call add(result, ' 4. lemonade (for SSH) https://github.com/pocke/lemonade')
call add(result, ' 5. doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/')
endif
else
if has('clipboard')
call add(result, ' SUCCEED!')
else
call add(result, ' Failed : to support +clipboard, you need recompile your vim with +clipboard support.')
endif
endif
return result
endfunction
" vim:set et sw=2: