3 ms·
I got that one some time ago from https://github.com/garybernhardt/dotfiles/blob/master/.vimrc#L167 https://github.com/garybernhardt/dotfiles/blob/master/.vimrc
by tremendo 10y ago
I got that one some time ago from https://github.com/garybernhardt/dotfiles/blob/master/.vimrc#L167 https://github.com/garybernhardt/dotfiles/blob/master/.vimrc... which offers several other useful functions and settings.
- grimgrin 10y agoIt'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>