likelycomplete : Collect & rank words for completion
| script karma
Downloaded by 370
Comments, bugs, improvements
script versions (upload new version)
|Once enabled for a filetype (see |g:likelycomplete_filetypes|), this
plugin observes any buffer of that filetype. It collects the words,
ranks them based on the probability of their occurrences (sort of) and
compiles a dictionary file that is fed to 'complete'. Any words that are
frequently used in files of enabled filetypes, are offered in the
completion list (see |i_CTRL-P|). The plugin also supports Insert mode
completion (see 'completefunc') that optionally takes into account the cursor's
The word list on disk is updated when leaving vim. It could take a few
editing sessions to get at a usable word list.
- Generate word lists for use in 'complete' (see also |ins-completion| and
- Set a 'completefunc' (incorporate results from the original
'completefunc' and optionally from 'omnifunc') -- see
Additional featues for use as 'completefunc':
- Auto-completion -- see |g:likelycomplete#auto_complete|
- Fuzzy completion -- see |g:likelycomplete#use_fuzzy_matches|
- Part of word completion -- see |g:likelycomplete#match_beginning|
- Context based sorting (not available for |i_CTRL-P|) -- see
- If finding the right completion via VIM's own popup menu is too
cumbersome, press <C-S-Space> -- see |g:likelycomplete#select_imap|
By default only completion via |i_CTRL-P| is enabled (and only for those
filetypes listed in |g:likelycomplete_filetypes|). Most of the above options
can be enabled by setting |g:likelycomplete#experimental| to 1.
|In order to install the vba, open the vba file in VIM and type: >
See :help vimball for details.
This script requires tlib (vimscript #1863) to be installed.
Also available via git: http://github.com/tomtom/likelycomplete_vim/
Users have to set |g:likelycomplete_filetypes| in |vimrc| in order to enable
LikelyComplete for certain filetypes.
Click on the package to download.
ip used for rating: 220.127.116.11
||- GetWordsSortedByRelevance(): Minor change to weighting len(base)/len(word)
- GetCompletions: Filter list ASAP in order to reduce runtime of tlib#list#Uniq(); fix s:Readlines: return copy of lines
MD5 checksum: 8e0bd638cd179e37c391ab1802752ed4
||- g:likelycomplete#prgname: Prefer vim if available
- likelycomplete#AsyncUpdateWordList(), s:UpdateWordList(): Escape special characters only on exec
- g:likelycomplete#base_context, g:likelycomplete#max_context
- Always insert base when called via <c-x><c-u>; remove dbg/log comments
- Call UpdateWordList() on BufDelete, not BufUnload
- Debugging, s:Run()
- g:likelycomplete#sources: Define source & order; g:likelycomplete#dictionaries: define dictionaries
- g:likelycomplete_per_window: per-window filetypes (not yet functional)
- Don't update word list when using w:likelycomplete_filetype
- Make sure not to update wordlist if sources don't include 'likelycomplete'
- FIX variable scope
- SetupComplete(): Add dictionaries to &complete and &dictionary
- Use "_" if filetype is empty; actually test likelycomplete#SetupFiletype()
- Renamed 'dict' to 'dictionaries'; support for including 'dictionary'
- g:likelycomplete#sources: Remove "?files"
MD5 checksum: c633c39845d8e2869ea26fb4cbe9561a
- use_words: Add the current buffer's words to the list of possible completions
- s:GetCompletions(): return unique words
- likelycomplete#ListPicker_tlib(): Temporarily set noshowmode
- g:likelycomplete#use_fuzzy_matches defaults to 0
- g:likelycomplete#use_fuzzy_matches defaults to 1 (again); slightly improved ranking for fuzzy patterns
- UpdateWordListNow: increased base value for AssessContext to 10; FIX comparison
- Make sure not to call AutoComplete twice
- Cache intermediate results in s:GetSortedCompletions()
MD5 checksum: 1f31791acf08a1f9266203c071c59f2a