9 ms·
It's nice to point that out. It shows the binding for shift-tab, as well. function! InsertTabWrapper() let col = col('.') - 1 if !col || getl
by grimgrin 10y ago
It's nice to point that out. It shows the binding for shift-tab, as well.
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <expr> <tab> InsertTabWrapper()
inoremap <s-tab> <c-n>