Skip to content

Instantly share code, notes, and snippets.

View TerryChau's full-sized avatar

Terry Chau TerryChau

View GitHub Profile
@TerryChau
TerryChau / .vimrc
Last active December 14, 2018 04:41 — forked from maxboisvert/.vimrc
Prevention of pressing of <C-P> again if the popup menu is already visible, and user <BS> characters then continue typing again.
" Add this to your vimrc to get a minimalist autocomplete pop
" Or use as a plugin : https://github.com/maxboisvert/vim-simple-complete
" Minimalist-TabComplete-Plugin
inoremap <expr> <Tab> TabComplete()
fun! TabComplete()
if getline('.')[col('.') - 2] =~ '\K' || pumvisible()
return "\<C-P>"
else