Last active
June 30, 2016 09:33
-
-
Save sgur/9ff31906959a098f12cf724ab124e7c6 to your computer and use it in GitHub Desktop.
Vim configuration for CLPUM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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