mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:10:04 +08:00
Add vim8 support
This commit is contained in:
parent
4fc14287f9
commit
df957672d4
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
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('/tmp/' . (has('nvim') ? 'spacevim_nvim_' : 'spacevim_vim_') . 'server', ':p')
|
||||||
endif
|
endif
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
try
|
try
|
||||||
@ -19,6 +19,11 @@ function! SpaceVim#server#connect()
|
|||||||
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
|
||||||
|
elseif exists('*remote_startserver')
|
||||||
|
if index(split(serverlist(), "\n"), $SPACEVIM_SERVER_ADDRESS) == -1
|
||||||
|
call remote_startserver($SPACEVIM_SERVER_ADDRESS)
|
||||||
|
call SpaceVim#logger#info('SpaceVim server startup at:' . $SPACEVIM_SERVER_ADDRESS)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
11
bin/nsvc
Executable file
11
bin/nsvc
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# SpaceVim client mode
|
||||||
|
# Copyright (c) 2016-2017 Shidong Wang & Contributors
|
||||||
|
# Author: Shidong Wang < wsdjeg at 163.com >
|
||||||
|
# URL: https://spacevim.org
|
||||||
|
# License: MIT license
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
nvr --servername /tmp/spacevim_nvim_server --remote $@
|
2
bin/svc
2
bin/svc
@ -8,4 +8,4 @@
|
|||||||
# License: MIT license
|
# License: MIT license
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
nvr --servername ~/.cache/SpaceVim/server --remote $@
|
/usr/bin/vim --servername /tmp/spacevim_vim_server --remote-silent $@
|
||||||
|
Loading…
Reference in New Issue
Block a user