lifepillar / vim-mucomplete

Chained completion that works the way you want!
MIT License
912 stars 18 forks source link

Autocompletion issue in Vim <7.4.775 with completeopt+=longest #135

Closed lifepillar closed 5 years ago

lifepillar commented 5 years ago

[The following issue was reported by @Felixoid].

If you have a version older than 7.4.775, adding longest to completeopt breaks autocompletion, because it automatically inserts a whole entry rather than inserting the longest common prefix. To reproduce, create a buffer with this content:

present
prepare

then :set completeopt+=longest, :MUcompleteAutoOn and, in Insert mode, type pr. You should see that prepare is inserted in the buffer. If you turn off MUcomplete and type pr<c-x><c-n> instead, only pre is inserted.