Reputation: 3001
I am using Vim with neocomplcache plugin, its feature of usage prompt while completion confused me so much.
It behaved like this: I typed <C-X><C-U>
when the cursor was at the end of os.path.
, then not only completion candidates was listed under the line, but also a horizontal split
which contained docstring of the first candidate appeared
at the top. My question is: how to get rid of this feature so that I only get code completion without the usage prompt?
Upvotes: 2
Views: 1274
Reputation: 3001
It's all because preview
is in completeopt
by default, you can see its value by type
command :set completeopt
and the result should be completeopt=menu,preview
.
What we need is just menu
, so cut the preview
, add this line in your vimrc:
set completeopt-=preview
vim help reference:
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview")
global
{not available when compiled without the
|+insert_expand| feature}
{not in Vi}
A comma separated list of options for Insert mode completion
|ins-completion|. The supported values are:
menu Use a popup menu to show the possible completions. The
menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu|
menuone Use the popup menu also when there is only one match.
Useful when there is additional information about the
match, e.g., what file it comes from.
longest Only insert the longest common text of the matches. If
the menu is displayed you can use CTRL-L to add more
characters. Whether case is ignored depends on the kind
of completion. For buffer text the 'ignorecase' option is
used.
preview Show extra information about the currently selected
completion in the preview window. Only works in
combination with "menu" or "menuone".
Upvotes: 10