Tab completion

This commit is contained in:
Sonny Bakker 2017-08-26 20:11:33 +02:00
parent c86cb20422
commit 981cc04743

View file

@ -129,3 +129,13 @@ map <silent> <C-E> :call ToggleVExplorer()<CR>
"Open quickfix window
map <F3> :copen <CR>
function! Tab_Or_Complete()
if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w'
return "\<C-N>"
else
return "\<Tab>"
endif
endfunction
inoremap <Tab> <C-R>=Tab_Or_Complete()<CR>