ListUltisnips()

This commit is contained in:
ManjaroOne666 2018-06-17 15:14:49 +01:00
parent 2dceef5bd0
commit d4da9fc55a
1 changed files with 15 additions and 1 deletions

View File

@ -38,7 +38,7 @@ Plug 'pangloss/vim-javascript'
Plug 'SirVer/ultisnips' Plug 'SirVer/ultisnips'
" and some snippets " and some snippets
" https://github.com/honza/vim-snippets " https://github.com/honza/vim-snippets
Plug 'honza/vim-snippets' " Plug 'honza/vim-snippets'
" ALE " ALE
" https://github.com/w0rp/ale " https://github.com/w0rp/ale
@ -343,12 +343,26 @@ let g:ale_fixers = {'javascript': ['eslint']}
" ultisnips " ultisnips
"{{{ "{{{
nnoremap <space>ul :call ListUltisnips()<cr>
inoremap jkul <c-o>:call ListUltisnips()<cr>
let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips' let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger='<c-j>' let g:UltiSnipsExpandTrigger='<c-j>'
let g:UltiSnipsJumpForwardTrigger='<c-f>' let g:UltiSnipsJumpForwardTrigger='<c-f>'
let g:UltiSnipsJumpBackwardTrigger='<c-d>' let g:UltiSnipsJumpBackwardTrigger='<c-d>'
let g:UltiSnipsEditSplit='horizontal' let g:UltiSnipsEditSplit='horizontal'
function! ListUltisnips() abort
let l:snips = UltiSnips#SnippetsInCurrentScope(1)
let l:keylist = sort(keys(l:snips))
for l:key in l:keylist
echo l:key . "\t" . l:snips[l:key]
endfor
" for [l:key, l:info] in items(l:snips)
" echo l:key . "\t" . l:info
" endfor
endfunction
"}}} "}}}
" Netrw " Netrw