Skip to content

Instantly share code, notes, and snippets.

@bfrg
Last active August 1, 2020 10:15
Show Gist options
  • Save bfrg/5b6979173b78d11bd975da017b486785 to your computer and use it in GitHub Desktop.
Save bfrg/5b6979173b78d11bd975da017b486785 to your computer and use it in GitHub Desktop.
Insert-mode completion using <Tab> as prefix instead of <C-X><C- >
" Shorthand for <c-x><c- > completion
"
" <tab>f triggers filename completion
" <tab>l triggers line completion
" <tab>] triggers tag completion
" ...
"
" Original idea by 'kvik' in #vim long time ago
for i in split(']defiklnopuvys', '\zs')
execute printf('inoremap <tab>%s <c-x><c-%s>', i, i)
endfor
inoremap <tab><tab> <tab>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment