覆盖插件导致的vim行为

时间:2015-12-26 21:07:23

标签: vim vi

当我使用插件“python-mode”并且我处于插入模式时,无论何时在对象名称之后按下句点(或“点”),不仅会打开自动完成,而且会打开一个帮助窗口一个单独的vim面板。这非常烦人。我想我需要将点重新映射到它在插入模式下的默认行为?我该怎么做?

2 个答案:

答案 0 :(得分:1)

那"帮助"被称为"预览窗口&#34 ;;你可以在:help preview-window中阅读所有相关内容。

答案 1 :(得分:1)

如果您要停用期间的所有功能,请将以下行添加到.vimrc

let g:pymode_rope_complete_on_dot = 0

如果要停止打开窗口,则应设置completeopt

'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".

           noinsert Do not insert any text for a match until the user selects
                    a match from the menu. Only works in combination with
                    "menu" or "menuone". No effect if "longest" is present.

           noselect Do not select a match in the menu, force the user to
                    select one from the menu. Only works in combination with
                    "menu" or "menuone".

键入completeopt=menu,preview时,您可能会:set completeopt。如您所见,preview选项会打开预览窗口。因此,您应该在.vimrc

中删除该选项
set completeopt=menu

此外,您的问题也存在问题,因此您可以对其进行跟踪:"Disable new window auto documentation"