Skip to content

Instantly share code, notes, and snippets.

@rbtnn
Last active May 8, 2023 10:10
Show Gist options
  • Save rbtnn/4373572564964a905d1c162ed3931497 to your computer and use it in GitHub Desktop.
Save rbtnn/4373572564964a905d1c162ed3931497 to your computer and use it in GitHub Desktop.
ddc.vimとpum.vimを試す最小限の設定
call plug#('Shougo/pum.vim')
call plug#('Shougo/ddc.vim')
call plug#('Shougo/ddc-around')
call plug#('Shougo/ddc-matcher_head')
call plug#('Shougo/ddc-sorter_rank')
call plug#('Shougo/ddc-converter_remove_overlap')
call plug#('vim-denops/denops.vim')
call ddc#custom#patch_global('completionMenu', 'pum.vim')
call ddc#custom#patch_global('sources', ['around'])
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank'],
\ 'converters': ['converter_remove_overlap'],
\ },
\ 'around': {'mark': 'A'},
\ })
call ddc#enable()
inoremap <Tab> <Cmd>call pum#map#insert_relative(+1)<CR>
inoremap <S-Tab> <Cmd>call pum#map#insert_relative(-1)<CR>
inoremap <C-n> <Cmd>call pum#map#insert_relative(+1)<CR>
inoremap <C-p> <Cmd>call pum#map#insert_relative(-1)<CR>
inoremap <C-y> <Cmd>call pum#map#confirm()<CR>
inoremap <C-e> <Cmd>call pum#map#cancel()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment