Collect words for completion
License
tomtom/likelycomplete_vim
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This plugin provides some sort of probabilistic insert mode completion (see |ins-completion|). It doesn't provide semantic source code completion that verifies the correctness of the code. LikelyComplete solely aims at saving keystrokes. 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 of |i_CTRL-P|. The plugin also supports insert mode completion via 'completefunc' (see |i_CTRL-X_CTRL-U|) that optionally takes into account the cursor's context. The word list on disk is updated when leaving vim. It could take a few editing sessions to get at a usable word list. Featues: - Generate word lists for use in 'complete' (see also |ins-completion| and |i_CTRL-P|) - Ranking of words based on the probability of their occurrence - Set a 'completefunc' (incorporate results from the original 'completefunc' and optionally from 'omnifunc') -- see |g:likelycomplete#set_completefunc| Additional featues for use as 'completefunc' (|i_CTRL-X_CTRL-U|): - 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 ranking -- see |g:likelycomplete#assess_context| - If finding the right completion via VIM's own |ins-completion-menu| is too cumbersome, press <C-S-Space> -- see |g:likelycomplete#select_imap| and |g:likelycomplete#list_picker| 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. Related Work~ There are of course other similar plugins you might want to check out if likelycomplete doesn't meet your requirements: - neocomplcache - YouCompleteMe - AutoComplPop - ... ----------------------------------------------------------------------- Install~ In order to install the vba, open the vba file in VIM and type: > :so % See :help vimball for details. This script requires tlib (vimscript #1863) to be installed. Also available via git: http://github.com/tomtom/likelycomplete_vim/ Post-Install~ Users have to set |g:likelycomplete_filetypes| in |vimrc| in order to enable LikelyComplete for certain filetypes. Dependencies: tlib (>= 1.19) :: http://github.com/tomtom/tlib_vim License: GPLv3 or later Install: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT See http://github.com/tomtom for related plugins.
About
Collect words for completion
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published