Skip to content

Instantly share code, notes, and snippets.

@sgur
Last active June 30, 2016 09:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgur/9ff31906959a098f12cf724ab124e7c6 to your computer and use it in GitHub Desktop.
Save sgur/9ff31906959a098f12cf724ab124e7c6 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment