" Author: Gergely Kontra " Version: 0.31 " 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. " You can cycle forward and backward with the and keys " ( will not work in the console version) " Note: you must press once to be able to cycle back " History: " 0.3 Back to the roots. Autocompletion is another story... " Now the prompt appears, when showmode is on " 0.31 Added for backward cycling. (req by: Peter Chun) if !exists('complType') "Integration with other copmletion functions... let complType="\" im =CtrlXPP() fu! CtrlXPP() if &smd ec''|ec '-- ^X++ mode (/^E/^Y/^L/^]/^F/^I/^K/^D/^V/^N/^P/n/p)' en let complType=nr2char(getchar()) if stridx( \"\\\\\\\\\\\np", \complType)!=-1 if stridx("\\",complType)!=-1 " no memory, just scroll... retu "\".complType elsei stridx('np',complType)!=-1 let g:complType=nr2char(char2nr(complType)-96) " char2nr('n')-char2nr("\ iun if g:complType=="\" || g:complType=='p' im ino el im ino en retu g:complType el echohl "Unknown mode" retu complType en endf " From the doc |insert.txt| improved im inore " 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... ino =SuperTab() ino =SuperTab() fu! SuperTab() if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$' return "\" el return g:complType en endf en