" Author: Gergely Kontra " Version: 0.1 " Description: " Use your tab key to do all your completion in insert mode! " The script remembers the last completion type, and applies that. " Eg.: You want to enter /usr/local/lib/povray3/ " You type (in insert mode): " /u/l/p/i " You can also manipulate the completion type used by changing g:complType " variable. let complType="\" imap =MyCompl() fu! MyCompl() echo''|echo '-- ^X++ mode (/^E/^Y/^L/^]/^F/^I/^K/^D/^V/^N/^P)' let complType=nr2char(getchar()) if stridx( \"\\\\\\\\\\\", \complType)!=-1 if complType!="\" && complType!="\" let g:complType="\".complType else let g:complType=complType endif if g:complType=="\" iun imap else iun imap endif return g:complType else echohl "Unknown mode" return complType endif endf " From the doc |insert.txt| improved imap " This way after hitting , hitting it once more will go to next match " (because in XIM mode and mappings are ignored) " and wont start a brand new completion " The side effect, that in the beginning of line and inserts a " , but I hope it may not be a problem... inoremap =SuperTab() inoremap =SuperTab() function! SuperTab() if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$' return "\" else return g:complType endfunction