Skip to content

Instantly share code, notes, and snippets.

@mbriggs
Created November 5, 2019 02:18
Show Gist options
  • Save mbriggs/1f84f2483b20275da6f4163f8f615673 to your computer and use it in GitHub Desktop.
Save mbriggs/1f84f2483b20275da6f4163f8f615673 to your computer and use it in GitHub Desktop.
vmap <TAB> <esc>mbgv=`bgv
nmap <TAB> mb==`b
imap <TAB> <C-R>=HandleITab()<cr>
func! HandleITab()
if pumvisible()
return "\<c-n>"
else
return "\<ESC>==i"
endif
endfunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment