1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00
This commit is contained in:
wsdjeg 2017-10-28 21:07:38 +08:00
parent 592994d5f7
commit bfdf29387c

View File

@ -81,6 +81,7 @@ function! SpaceVim#layers#autocomplete#config() abort
"mapping
if s:tab_key_behavior ==# 'smart'
if has('patch-7.4.774')
imap <silent><expr><TAB> SpaceVim#mapping#tab()
smap <expr><TAB>
\ neosnippet#expandable_or_jumpable() ?
@ -89,6 +90,9 @@ function! SpaceVim#layers#autocomplete#config() abort
\ "\<plug>(complete_parameter#goto_next_parameter)" :
\ "\<TAB>")
imap <silent><expr><S-TAB> SpaceVim#mapping#shift_tab()
else
call SpaceVim#logger#warn('smart tab in autocomplete layer need patch 7.4.774')
endif
elseif s:tab_key_behavior ==# 'complete'
inoremap <expr> <Tab> pumvisible() ? "\<C-y>" : "\<C-n>"
elseif s:tab_key_behavior ==# 'cycle'