sponsor Vim development Vim logo Vim Book Ad

MUcomplete : Chained (fallback) completion that works the way you want!

 script karma  Rating 189/62, Downloaded by 7339  Comments, bugs, improvements  Vim wiki

created by
Lifepillar
 
script type
utility
 
description
GitHub page: https://github.com/lifepillar/vim-mucomplete

MUcomplete is a minimalist autocompletion plugin for Vim.

MUcomplete is an implementation of chained (fallback) completion, whereby several completion methods are attempted one after another until a result is returned.

Under the hood, MUcomplete does nothing more than typing some completion mappings for you, either when you press <tab>/<s-tab> or automatically while you are typing. You choose which completion methods to use and in which order, and MUcomplete does the rest. It does no caching, no asynchronous computation, no intelligent guessing. It just makes use of core Vim features.

MUcomplete brings Vim completion down to earth again.

Mandatory Vim settings:

    set completeopt+=menuone

For automatic completion, you also need one of the following:

    set completeopt+=noselect
    set completeopt+=noinsert

Other recommended settings:

    set shortmess+=c   " Shut off completion messages
    set belloff+=ctrlg " If Vim beeps during completion

No other configuration is needed. Just start pressing <tab> or <s-tab> to complete a word. If you want to enable automatic completion at startup, put

    let g:mucomplete#enable_auto_at_startup = 1

in your .vimrc. Automatic completion may be enabled and disabled at any time with :MUcompleteAutoToggle.

By default, MUcomplete attempts:

1. path completion, if the text in front of the cursor looks like a path;
2. omni-completion, if enabled in the current buffer;
3. buffer keyword completion;
4. dictionary completion, if a dictionary is set for the current buffer;
5. spelling completion, if 'spell' is on and 'spelllang' is set;

in this order (this is called a “completion chain”). At the first successful attempt, the pop-up menu shows the results. When the pop-up menu is visible, you may cycle back and forth through the completion chain and try different completion methods by pressing <c-h> and <c-j>, respectively.

MUcomplete is fully customizable. See :help mucomplete.txt for detailed documentation.

Important: by itself, MUcomplete does not provide any “intellisense”/semantic completion. If you want that, you also need to install suitable omni completion plugins for the languages you are using.
 
install details
 

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
vim-mucomplete-1.5.0.tar.gz 1.5.0 2020-11-16 7.2 Lifepillar License under the MIT license.
vim-mucomplete-1.4.1.tar.gz 1.4.1 2019-12-01 7.0 Lifepillar Minor bug fixes mostly related to spelling, dictionary and thesaurus completions.
vim-mucomplete-1.4.0.tar.gz 1.4.0 2019-04-26 7.2 Lifepillar MUcomplete keeps improving, thanks to users's feedback! This release features: improved compatibility with LanguageClient (don't skip `:help mucomplete-compatibility`); syntax-aware completion chains (`:help g:mucomplete#scoped_chains`); improved completion for HTML/XML; new options (g:mucomplete#empty_text_auto and g:mucomplete#reopen_immediately) and a new function (mucomplete#add_user_mapping()). And of course, even better documentation!
vim-mucomplete-1.3.0.tar.gz 1.3.0 2019-01-01 7.2 Lifepillar Happy new year! 🥂 MUcomplete has a new completion method called "list", which allows you to use your own list of words (yes, per filetype)! Other fixes: path completion now completes paths after an equal sign not followed by spaces; better autocompletion in Vim older than 7.4.775; improved documentation. 🍾
vim-mucomplete-1.2.1.tar.gz 1.2.1 2018-10-27 7.2 Lifepillar NEW FEATURES: (1) MUcompletePmenu event is triggered upon successful completion; (2) Notifications: display the name or description of the current completion method in the command line or in the status line; (3) Compatibility with Neosnippet; (4) Optionally delay completion with timers (instead of using CursorHoldI and updatetime); (5) Specific activation patterns for C/C++ and HTML/XML; (6) New option to set the minimum number of (keyword) characters before the cursor needed to trigger autocompletion.
OTHER IMPROVEMENTS: More robust path completion. Better support for UltiSnips and SnipMate. Updated documentation.
If you like MUcomplete, consider donating to the project (see Readme)!
vim-mucomplete-1.1.0.tar.gz 1.1.0 2018-08-04 7.2 Lifepillar MUcomplete's development did not stop with v1.0! There's already a new feature: delayed auto-completion allows MUcomplete to kick in only when you pause typing! Besides, MUcomplete does not map <c-e>, <c-y> and <cr> any more (requires Vim 8.0.0283 or later), so conflicts with other plugins (e.g., endwise) are avoided. Improved backward compatibility: auto-completion is available in Vim versions as early as 7.4.143 (minimum required version is still 7.2). Option mucomplete#smart_enter has been removed: see `:help mucomplete-tips` for a replacement.
vim-mucomplete-1.0.0.tar.gz 1.0.0 2018-07-23 7.2 Lifepillar MUcomplete reaches milestone release 1.0.0! After 21 months of development, MUcomplete has earned more than 370 stars on GitHub and has 0 (zero!) open issues (at the time of this release)! Much simpler than most other completion plugins, pure Vim script with minimal requirements (works in Vim 7.2 through Vim 8), MUcomplete tries not to reinvent the wheel, but stands on the shoulder of a giant (Vim!), streamlining Vim's own completion methods, but also allowing the flexibility of adding your own. MUcomplete's documentation is longer than MUComplete's code and it rocks! Don't skip it!
vim-mucomplete-1.0.0rc8.tar.gz 1.0.0rc8 2018-05-13 7.2 Lifepillar Plugs for extending the current completion (e.g., to expand 'Ne' to 'New York Times') now work with every value of completeopt. Fixed the “natural” direction for line completion. Minor bug fixes. Added more tests. Updated documentation.

**Release 1.0.0** is approaching! Please report any issue you may have with this version!
vim-mucomplete-1.0.0rc7.tar.gz 1.0.0rc7 2018-03-22 7.2 Lifepillar New feature: extend the completed text by copying the words following the previous expansion in other contexts (requires a mapping by the user). New option: g:mucomplete#smart_enter (when set, always insert a new line when typing Enter to close the popup menu). Omni-complete after dots in Python buffers. Document settings to improve compatibility with auto-pairs and endwise. A couple of bug fixes.
Version 1.0.0 is approaching! Please report any issues you may have with this release!
vim-mucomplete-1.0.0rc6.tar.gz 1.0.0rc6 2018-03-04 7.2 Lifepillar Further improvements and bug fixes to path completion. Minor fix for users overriding cycling keys. Added a minimal test frameworks and some tests. Version 1.0.0 is approaching! Please report any issues you may have with the current release!
vim-mucomplete-1.0.0rc4.tar.gz 1.0.0rc4 2018-02-04 7.2 Lifepillar Further tweaks to path completion.
Version 1.0.0 is approaching: please report any issues you may have with release!
vim-mucomplete-1.0.0rc3.tar.gz 1.0.0rc3 2018-02-03 7.2 Lifepillar Windows users enjoy! Now you can complete paths with forward slashes, too! Other improvements to completion for all users, in particular when completing paths with spaces. A few minor bug fixes. Updated docs. New options: g:mucomplete#look_behind, g:mucomplete#use_only_windows_paths.
Version 1.0.0 is approaching: please report any issues you have with this version!
vim-mucomplete-1.0.0rc2.tar.gz 1.0.0rc2 2018-01-21 7.2 Lifepillar Simplified configuration (no need to define mappings for <c-e>, <c-y> and <cr> any longer!). Reduced startup time. A few new options. Better error reporting of conflicting mappings. A few minor bug fixes. Better help file.
vim-mucomplete-1.0.0rc1.tar.gz 1.0.0rc1 2017-04-21 7.2 Lifepillar MUcomplete becomes even better and goes 1.0! The autocompletion mechanism is now based on a synergy between InsertCharPre and TextChangedI for a better user experience. Besides, a couple of minor bug fixes and some code refactoring.
vim-mucomplete-1.0.0b3.tar.gz 1.0.0.0b3 2017-04-19 7.2 Lifepillar MUcomplete becomes even better and goes 1.0! Autocompletion is now based on InsertCharPre instead of TextChangedI. CompleteDone is not used any longer. Removed g:mucomplete#trigger_auto_pattern: use g:mucomplete#can_complete instead.
vim-mucomplete-1.0.0b2.tar.gz 1.0.0b2 2017-04-18 7.2 Lifepillar Fixed a critical regression.
MUcomplete becomes even better and goes 1.0! With better autocompletion, other new cool features and bug fixes.
vim-mucomplete-1.0.0b1.tar.gz 1.0.0b1 2017-04-17 7.2 Lifepillar MUcomplete becomes even better and goes 1.0! Much improved autocompletion experience: the pop-up menu does not go on and off on alternating keys any longer! Make <tab> move in the pop-up menu from top to bottom or from bottom to top on a per-completion type basis! Allow path completion relative to the directory of the current buffer! Use 'path' completion by default. Et cetera… All of this in the same amount of code! Please check the Readme and the documentation.
vim-mucomplete-0.5.0.tar.gz 0.5.0 2016-12-15 7.2 Lifepillar Too many changes to list here. Some highlights: improved spelling method, with new options; ignore `noselect` for manual completion (except for spelling methods); use <c-j> instead of <c-l> as a right cycling key, for better compatibility; new setting to exit ctrl-x submode (mucomplete#exit_ctrlx_keys has been removed) and new default value (`<c-g><c-g>`); bug fixes in 'cmd' and 'ulti' methods, and other critical and less critical bug fixes. Kudos to bug hunter LacyGoIll for reporting and solving several issues!
vim-mucomplete-0.4.3.tar.gz 0.4.3 2016-12-04 7.2 Lifepillar Improved documentation.
vim-mucomplete-0.4.2.tar.gz 0.4.2 2016-11-26 7.2 Lifepillar Improved documentation.
vim-mucomplete-0.4.1.tar.gz 0.4.1 2016-11-19 7.2 Lifepillar Added flag variable that tells whether completion is initiated automatically or by pressing a key. Fixed a bug in 'line' completion. Expanded documentation.
vim-mucomplete-0.4.0.tar.gz 0.4.0 2016-11-15 7.2 Lifepillar - New 'path' completion method that works similar to YouCompleteMe.
- New 'uspl' spelling suggestion method, which acts only on the word in front of the cursor.
- Several bug fixes.
- Compatible with Vim 7.2 or later.
vim-mucomplete-0.3.1.tar.gz 0.3.1 2016-11-04 7.3 Lifepillar Respect completeopt's settings, including noinsert and noselect.
vim-mucomplete-0.3.0.tar.gz 0.3.0 2016-11-02 7.3 Lifepillar Added the ability to cycle back and forth through completion methods while the pop-up is visible.
Improved compatibility with older Vim. Other minor additions and a few code optimizations.
vim-mucomplete-0.2.0.tar.gz 0.2.0 2016-10-28 7.4 Lifepillar Improve compatibility with older Vim. Add more options. Add support for suggesting UltiSnips snippets. Other minor fixes.
vim-mucomplete-0.1.2.tar.gz 0.1.2 2016-10-26 8.0 Lifepillar Fixed a bug causing completion methods to be skipped even when they return results.
vim-mucomplete-0.1.1.tar.gz 0.1.1 2016-10-24 8.0 Lifepillar Fix a bug preventing tab completion to display the popup menu.
vim-mucomplete-0.1.0.tar 0.1.0 2016-10-23 8.0 Lifepillar Initial upload
ip used for rating: 34.229.223.223

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.
   
Vim at Github