Shougo / neocomplcache.vim

Ultimate auto-completion system for Vim.
http://www.vim.org/scripts/script.php?script_id=2620
1.72k stars 135 forks source link

Add CursorHoldI event to buffer_complete check_cache() #388

Closed zhaocai closed 11 years ago

zhaocai commented 11 years ago

You may type, hold, and think

Shougo commented 11 years ago

Why did you add this feature? I think this behavior is not necessary.

zhaocai commented 11 years ago

Suppose you are writing an article. You may not leave insert mode but you do pause to think sometime. So CursorHoldI is the event for recaching what has been written.

Shougo commented 11 years ago

OK. I will merge it.

lookforit commented 11 years ago

You may type, hold, and think

what does hold mean? a demonstration for this feature will be nice.

zhaocai commented 11 years ago

It is just autocmd event. When should neocomplcache work on recache.


CursorHold      When the user doesn't press a key for the time
                specified with 'updatetime'.  Not re-triggered
                until the user has pressed a key (i.e. doesn't
                fire every 'updatetime' ms if you leave Vim to
                make some coffee. :)  See |CursorHold-example|
                for previewing tags.
                This event is only triggered in Normal mode.
                It is not triggered when waiting for a command
                argument to be typed, or a movement after an
                operator.
                While recording the CursorHold event is not
                triggered. |q|
                Note: Interactive commands cannot be used for
                this event.  There is no hit-enter prompt,
                the screen is updated directly (when needed).
                Note: In the future there will probably be
                another option to set the time.
                Hint: to force an update of the status lines
                use: >
                    :let &ro = &ro
<               {only on Amiga, Unix, Win32, MSDOS and all GUI
                versions}
                            *CursorHoldI*
CursorHoldI         Just like CursorHold, but in Insert mode.
lookforit commented 11 years ago

It is just autocmd event. When should neocomplcache work on recache

sounds make sense :smile: