diff --git a/autoload/SpaceVim/mapping.vim b/autoload/SpaceVim/mapping.vim index 37a22081b..e480a5ddb 100644 --- a/autoload/SpaceVim/mapping.vim +++ b/autoload/SpaceVim/mapping.vim @@ -91,6 +91,9 @@ endfunction if get(g:, 'spacevim_snippet_engine', 'neosnippet') ==# 'neosnippet' function! SpaceVim#mapping#shift_tab() abort + if g:spacevim_autocomplete_method ==# 'coc' && coc#pum#visible() + return coc#pum#prev(1) + endif return pumvisible() ? "\" : "\delimitMateS-Tab" endfunction elseif get(g:, 'spacevim_snippet_engine', 'neosnippet') ==# 'ultisnips' diff --git a/autoload/SpaceVim/mapping/tab.vim b/autoload/SpaceVim/mapping/tab.vim index 4333f5125..03afcdff9 100644 --- a/autoload/SpaceVim/mapping/tab.vim +++ b/autoload/SpaceVim/mapping/tab.vim @@ -26,6 +26,8 @@ if g:spacevim_snippet_engine ==# 'neosnippet' \ && luaeval("require('cmp').visible()") \ ) return "\" + elseif g:spacevim_autocomplete_method ==# 'coc' && coc#pum#visible() + return coc#pum#next(1) elseif has('patch-7.4.774') \ && g:spacevim_autocomplete_method !=# 'nvim-cmp' \ && complete_parameter#jumpable(1)