Vim configuration for CLPUM
if has('clpum')
cnoremap <expr> <C-g> <SID>key_descend()
cnoremap <expr> <C-w> <SID>key_ascend()
function! s:key_descend() abort "{{{
if clpumvisible()
call feedkeys("\<Right>", "t")
return ""
endif
return "\<C-g>"
endfunction "}}}
function! s:key_ascend() abort "{{{
if clpumvisible()
call feedkeys("\<Left>", "t")
return ""
endif
return "\<C-w>"
endfunction "}}}
set wildmode=popup
set clpumheight=40
augroup vimrc_clpum
autocmd!
autocmd ColorScheme * call s:do_highlight()
augroup END
function! s:do_highlight() abort "{{{
highlight clear ClPmenu
highlight clear ClPmenuSbar
highlight clear ClPmenuSel
highlight clear ClPmenuThumb
highlight link ClPmenu Pmenu
highlight link ClPmenuSbar PmenuSbar
highlight link ClPmenuSel PmenuSel
highlight link ClPmenuThumb PmenuThumb
endfunction "}}}
endif