Skip to content

Instantly share code, notes, and snippets.

View tommcdo's full-sized avatar

Tom McDonald tommcdo

  • Windsor, ON, Canada
View GitHub Profile
set cot=menu,menuone
ino <BS> <BS><C-r>=getline('.')[col('.')-4:col('.')-2]=~#'\k\k\k'?!pumvisible()?"\<lt>C-n>\<lt>C-p>":'':pumvisible()?"\<lt>C-y>":''<CR>
ino <CR> <C-r>=pumvisible()?"\<lt>C-y>":""<CR><CR>
ino <Tab> <C-r>=pumvisible()?"\<lt>C-n>":"\<lt>Tab>"<CR>
ino <S-Tab> <C-r>=pumvisible()?"\<lt>C-p>":"\<lt>S-Tab>"<CR>
augroup MyAutoComplete
au!
au InsertCharPre * if