ListUltisnips()
This commit is contained in:
parent
2dceef5bd0
commit
d4da9fc55a
|
@ -38,7 +38,7 @@ Plug 'pangloss/vim-javascript'
|
|||
Plug 'SirVer/ultisnips'
|
||||
" and some snippets
|
||||
" https://github.com/honza/vim-snippets
|
||||
Plug 'honza/vim-snippets'
|
||||
" Plug 'honza/vim-snippets'
|
||||
|
||||
" ALE
|
||||
" https://github.com/w0rp/ale
|
||||
|
@ -343,12 +343,26 @@ let g:ale_fixers = {'javascript': ['eslint']}
|
|||
|
||||
" ultisnips
|
||||
"{{{
|
||||
nnoremap <space>ul :call ListUltisnips()<cr>
|
||||
inoremap jkul <c-o>:call ListUltisnips()<cr>
|
||||
|
||||
let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
|
||||
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
|
||||
let g:UltiSnipsExpandTrigger='<c-j>'
|
||||
let g:UltiSnipsJumpForwardTrigger='<c-f>'
|
||||
let g:UltiSnipsJumpBackwardTrigger='<c-d>'
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue