1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-22 08:45:42 +08:00

Fix vim error

This commit is contained in:
wsdjeg 2017-11-08 21:49:09 +08:00
parent c8dfcc4745
commit 4fc14287f9

View File

@ -10,20 +10,22 @@
function! SpaceVim#server#connect() function! SpaceVim#server#connect()
if empty($SPACEVIM_SERVER_ADDRESS) if empty($SPACEVIM_SERVER_ADDRESS)
let $SPACEVIM_SERVER_ADDRESS = fnamemodify('~/.cache/SpaceVim/server', ':p') let $SPACEVIM_SERVER_ADDRESS = fnamemodify('~/.cache/SpaceVim/server', ':p')
endif endif
if has('nvim')
try try
call serverstart($SPACEVIM_SERVER_ADDRESS) call serverstart($SPACEVIM_SERVER_ADDRESS)
call SpaceVim#logger#info('SpaceVim server startup at:' . $SPACEVIM_SERVER_ADDRESS) call SpaceVim#logger#info('SpaceVim server startup at:' . $SPACEVIM_SERVER_ADDRESS)
catch /Failed to start server: address already in use/ catch /Failed to start server: address already in use/
endtry endtry
endif
endfunction endfunction
function! SpaceVim#server#export_server() function! SpaceVim#server#export_server()
call system('export $TEST_SPACEVIM="test"') call system('export $TEST_SPACEVIM="test"')
endfunction endfunction
@ -32,10 +34,10 @@ function! SpaceVim#server#terminate()
endfunction endfunction
function! SpaceVim#server#list() function! SpaceVim#server#list()
if has('nvim') if has('nvim')
return join(serverlist(), "\n") return join(serverlist(), "\n")
else else
endif endif
endfunction endfunction