找到这个word_complete.vim还不错。
下载地址是:
http://vim.sourceforge.net/scripts/down ... rc_id=5704
http://vim.sourceforge.net/scripts/scri ... ript_id=73
description
---------------------
Each time you type an alphabetic character, the script attempts
to complete the current word. The suggested completion is selected
in Select mode, so you can just type another character to keep going.
Other options: <Tab> to accept, <BS> to get rid of the completion,
<Esc> to leave Insert mode without accepting the completion, <C-N>
or <C-P> to cycle through choices, <C-X> to enter <C-X> mode.
Limitations:
The script works by :imap'ping each alphabetic character, and uses
Insert-mode completion (:help i_ctrl-p). It is far from perfect. For example, the :imap's mean that you are constantly switching out of Insert mode, which means that undo only works a few characters at a time. This also messes up any abbreviations you may have defined. Since Select mode uses the same mappings as Visual mode, the special keys mentioned above may conflict with what you are used to in Visual mode. I have received one report that mswin.vim interferes with this script.
Every second character you type is in Select mode, so with versions of vim before 6.2, completions are offered only half the time.
install details
---------------------------
:source it from your vimrc file or drop it in your plugin directory.
To activate, choose "Word Completion" from the Tools menu, or type
:call DoWordComplete()
To make it stop, choose "Tools/Stop Completion," or type
:call EndWordComplete()
If you want to activate word completion for every buffer, add the line
:autocmd BufEnter * call DoWordComplete()
to your vimrc file.