1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:40:03 +08:00

Use deoplete only for vim8 (#1604)

* Use deoplete only for vim8

* Use deoplete only for vim8

* Fix gui fonts

* Fix 74

* Fix up

* Fix issue
This commit is contained in:
Wang Shidong 2018-04-09 20:07:27 +08:00 committed by GitHub
parent f01a649b70
commit 5fbd92c607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 18 deletions

View File

@ -104,7 +104,8 @@ let g:spacevim_realtime_leader_guide = 1
" let g:spacevim_enable_key_frequency = 1
" <
let g:spacevim_enable_key_frequency = 0
if has('python3') && SpaceVim#util#haspy3lib('neovim')
if (has('python3') && SpaceVim#util#haspy3lib('neovim')) &&
\ (has('nvim') || (has('patch-8.0.0027')))
""
" Set the autocomplete engine of spacevim, the default logic is:
" >

View File

@ -30,6 +30,7 @@ else
else
let s = a:1
endif
let output = ''
redir => output
if s ==# 'silent'
silent execute a:cmd

View File

@ -13,12 +13,12 @@ function! SpaceVim#issue#report() abort
endfunction
function! s:open() abort
exe 'tabnew ' . tempname() . '/issue_report.md'
exe 'silent tabnew ' . tempname() . '/issue_report.md'
let b:spacevim_issue_template = 1
let template = s:template()
call setline(1, template)
let @+ = join(template, "\n")
w
silent w
endfunction
function! s:spacevim_status() abort
@ -52,7 +52,7 @@ function! s:template() abort
\ '',
\ '## Output of the `:SPDebugInfo!`',
\ '']
\ + split(SpaceVim#api#import('vim#compatible').execute(':SPDebugInfo'), "\n") +
\ + split(s:CMP.execute(':SPDebugInfo'), "\n") +
\ [
\ '## Screenshots',
\ '',

View File

@ -5,16 +5,17 @@
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
let s:CPT = SpaceVim#api#import('vim#compatible')
function! SpaceVim#options#list() abort
let list = []
if has('patch-7.4.2010') && 0
if has('patch-7.4.2010')
for var in getcompletion('g:spacevim_','var')
call add(list, var . ' = ' . string(get(g:, var[2:] , '')))
endfor
else
redraw
for var in filter(map(s:execute('let g:'), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'")
for var in filter(map(split(s:CPT.execute('let g:'), "\n"), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'")
call add(list,'g:' . var . ' = ' . string(get(g:, var , '')))
endfor
endif
@ -33,15 +34,4 @@ function! SpaceVim#options#set(argv, ...) abort
endif
endfunction
function! s:execute(cmd) abort
if exists('*execute')
return split(execute(a:cmd), "\n")
endif
redir => output
execute a:cmd
redir END
return split(output, "\n")
endfunction
" vim:set et sw=2:

View File

@ -29,5 +29,5 @@ if g:spacevim_hiddenfileinfo == 1 && has('patch-7.4.1570')
set shortmess+=F
endif
if !empty(g:spacevim_guifont)
exe 'set guifont=' . g:spacevim_guifont
let &guifont = g:spacevim_guifont
endif