From 95921517a780f7e3a1e9c646fbe07db8a44d1be8 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Thu, 3 Feb 2022 20:31:06 +0800 Subject: [PATCH] fix(unite): fix `SPC i s` key binding --- autoload/SpaceVim/layers/unite.vim | 5 +++++ docs/layers/autocomplete.md | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/layers/unite.vim b/autoload/SpaceVim/layers/unite.vim index 2a69d7a1d..1ef87429d 100644 --- a/autoload/SpaceVim/layers/unite.vim +++ b/autoload/SpaceVim/layers/unite.vim @@ -82,6 +82,11 @@ function! SpaceVim#layers#unite#config() abort call SpaceVim#mapping#space#def('nnoremap', ['r', 'l'], 'Unite resume', 'resume unite buffer', 1) let g:_spacevim_mappings_space.i = {'name' : '+Insertion'} call SpaceVim#mapping#space#def('nnoremap', ['i', 'u'], 'Unite unicode', 'search-and-insert-unicode', 1) + if g:spacevim_snippet_engine ==# 'neosnippet' + call SpaceVim#mapping#space#def('nnoremap', ['i', 's'], 'Unite neosnippet', 'insert snippets', 1) + elseif g:spacevim_snippet_engine ==# 'ultisnips' + call SpaceVim#mapping#space#def('nnoremap', ['i', 's'], 'Unite ultisnips', 'insert snippets', 1) + endif if has('nvim') let cmd = 'Unite file_rec/neovim' else diff --git a/docs/layers/autocomplete.md b/docs/layers/autocomplete.md index d80e0297f..72a746294 100644 --- a/docs/layers/autocomplete.md +++ b/docs/layers/autocomplete.md @@ -179,6 +179,7 @@ To disable this feature, set the variable `auto_completion_enable_snippets_in_po | `M-/` | Expand a snippet if text before point is a prefix of a snippet | | `SPC i s` | List all current snippets for inserting | -NOTE: `SPC i s` requires that at least one fuzzy search layer be loaded. +NOTE: `SPC i s` requires that at least one fuzzy search layer be loaded. If the `snippet_engine` is `neosnippet`. +The fuzzy finder layer can be `leaderf`, `denite` or `unite`. For `ultisnips`, you can use `leaderf` or `unite` layer.