sponsor Vim development Vim logo Vim Book Ad

AmbiCompletion : Ambiguous completion

 script karma  Rating 4/1, Downloaded by 611    Comments, bugs, improvements  Vim wiki

created by
Shuhei Kubota
script type
  This script provides an ambiguous completion functionality.

  A long function name, tired to type, a vague memory of spelling, ...
  Ambiguous completion supports you with similar words in your buffer.

  Your type does not need to match the beginning of answer word.
  "egining" -> "beginning"
  For those who are forgetful.

  This is a fork of the first version of Word Fuzzy Completion.
  adding middle-word-match, architectural changes(mainly no need +python), global candidates.


  1. Set completefunc to g:AmbiCompletion.

      :set completefunc=g:AmbiCompletion

      :inoremap <C-U>  <C-X><C-U>

  2. (optional) If you have globally useful dictionary, then

      :AmbiCompletionAddGlobal  my/favorite/dictfile
      :AmbiCompletionAddGlobal  my/favorite/another
      "this makes completion actions slow down


  (A right hand side value is a default value.)

  g:AmbiCompletion_cacheCheckpoint = 10

      cache-updating interval.
      The cache is updated when undo sequence progresses by this value.

  g:AmbiCompletion_cacheShorteningFactors = {'0': 0.1, '100': 0.25, '500': 0.5, '1000': 0.75, '5000': 1}

      cach-updating factors. {'line-order': cache-updating factor, ...}
      In small size file, caches are updated frequently. In large size file,
      caches are updated less frequently.


      updates the cache in a current buffer immediately.
  AmbiCompletionAddGlobal {filename}...

      adds words in {filename} into word candidates.
      Multiple {filename} are allowed.
install details
Put this plugin in your plugin directory(e.g. $VIMRUNTIME/plugin).
Then source it or restart VIM.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ambicompletion.vim 0.6 2015-11-24 7.0 Shuhei Kubota Each-buffer cache of candidates & Global word completion.
ambicompletion.vim 0.5 2015-11-21 7.0 Shuhei Kubota More timely cache refreshing.
ambicompletion.vim 0.4 2015-02-13 7.0 Shuhei Kubota x10 faster!
more multibyte-completion accuracy
ambicompletion.vim 0.3 2015-02-05 7.0 Shuhei Kubota implemented a simple caching mechanism.
ambicompletion.vim 0.2b 2012-09-03 7.0 Shuhei Kubota fixed encoding handling in +python
ambicompletion.vim 0.2a 2012-08-05 7.0 Shuhei Kubota added encoding handling in +python.
added among-buffers collection by letting g:AmbiCompletion_allBuffers = 1.
ambicompletion.vim 0.1a 2012-05-05 7.3 Shuhei Kubota Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo