本文介绍了你如何自动Vim的自动完成后删除preVIEW窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用omnifunc = pythoncomplete。当自动填入一个词(例如,操作系统),我得到资格类成员和职能,如预期的列表,以及与有关所选成员或函数文档一个临时缓冲区preVIEW窗口。这是伟大的,但我选择想要的功能之后,preVIEW窗口仍然存在。我可以得到摆脱它:PC,但我想这只是我选择我的功能,一拉的Eclipse后自动消失。我打得四处completeopt,但无济于事。

I'm using omnifunc=pythoncomplete. When autocompleting a word (e.g., os.), I get the list of eligible class members and functions, as expected, as well as a scratch buffer preview window with documentation about the selected member or function. This is great, but after selecting the function I want, the preview window remains. I can get rid of it with ":pc", but I'd like it just to automatically disappear after I've selected my function, a la Eclipse. I've played around with "completeopt" but to no avail.

推荐答案

把你的vimrc以下内容:

Put the following in your vimrc:

" If you prefer the Omni-Completion tip window to close when a selection is
" made, these lines close it on movement in insert mode or when leaving
" insert mode
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif

这篇关于你如何自动Vim的自动完成后删除preVIEW窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 08:05