Vim 启动时显示“Press ENTER or type command to continue”

Pan*_*eng 6 vim enter vundle

VIM 启动时显示一条消息“按 ENTER 或键入命令继续”,VIM 会出现这种情况,但 GVIM 不会,GVIM 启动时不会显示“按 ENTER 或键入命令继续\xe2\x80\x9d。

\n\n

我的 .vimrc 文件中的 Vundle 设置,操作系统是 windows 7。

\n\n
"""""""""""""""""""""""""""Vundle start"""""""""""""""""""""""""""""""""\n" set the runtime path to include Vundle and initialize\nset rtp+=C:/Users/penpan/.vim/bundle/Vundle.vim\ncall vundle#begin()\n" alternatively, pass a path where Vundle should install plugins\n"call vundle#begin(\'~/some/path/here\')\n\n" let Vundle manage Vundle, required\nPlugin \'VundleVim/Vundle.vim\'\n\n" The following are examples of different formats supported.\n" Keep Plugin commands between vundle#begin/end.\n" plugin on GitHub repo\nPlugin \'tpope/vim-fugitive\'\n" plugin from http://vim-scripts.org/vim/scripts.html\nPlugin \'L9\'\n" The sparkup vim script is in a subdirectory of this repo called vim.\n" Pass the path to set the runtimepath properly.\nPlugin \'rstacruz/sparkup\', {\'rtp\': \'vim/\'}\n" Avoid a name conflict with L9\nPlugin \'user/L9\', {\'name\': \'newL9\'}\n"NERDTree\nPlugin \'https://github.com/scrooloose/nerdtree.git\'\n"color scheme molokai\nPlugin \'tomasr/molokai\'\n"Match Tag\nPlugin \'Valloric/MatchTagAlways\'\n"ctags\nPlugin \'szw/vim-tags\'\n" All of your Plugins must be added before the following line\ncall vundle#end()            " required\nfiletype plugin indent on    " required\n" To ignore plugin indent changes, instead use:\nfiletype plugin on\n"\n" Brief help\n" :PluginList       - lists configured plugins\n" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate\n" :PluginSearch foo - searches for foo; append `!` to refresh local cache\n" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal\n"\n" see :h vundle for more details or wiki for FAQ\n" Put your non-Plugin stuff after this line\n""""""""""""""""""""""""""""End Vundle"""""""""""""""""""""""""""""""""\n
Run Code Online (Sandbox Code Playgroud)\n\n

我评论这一行:

\n\n
call vundle#end()            " required\n
Run Code Online (Sandbox Code Playgroud)\n\n

然后就可以了!VIM 启动时不显示按 Enter 提示。所以我相信这个电话会让提示发生。我加沉默!其前面如下:

\n\n
silent! call vundle#end()\n
Run Code Online (Sandbox Code Playgroud)\n\n

但没有用,VIM 仍然显示提示。\n并在 .vimrc 中添加以下内容:

\n\n
set shortmess+=T\nset cmdheight=2\n
Run Code Online (Sandbox Code Playgroud)\n\n

不起作用。

\n\n

我试图在谷歌中找到答案,提出了很多建议,但没有一个起作用:(

\n\n

Vundle是一个常见的插件,有人和我有同样的问题吗?

\n\n

如果您能提供帮助,请不胜感激。

\n\n

仅当我删除以下内容时,按回车提示才会消失:

\n\n
call vundle#end()            " required\nfiletype plugin indent on    " required\n" To ignore plugin indent changes, instead use:\nfiletype plugin on\n"\n" Brief help\n" :PluginList       - lists configured plugins\n" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate\n" :PluginSearch foo - searches for foo; append `!` to refresh local cache\n" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal\n"\n" see :h vundle for more details or wiki for FAQ\n" Put your non-Plugin stuff after this line\n""""""""""""""""""""""""""""End Vundle"""""""""""""""""""""""""""""""""\ncolorscheme molokai "because molokai is installed by Vundle, so it only work after Vundle is lunched!\n
Run Code Online (Sandbox Code Playgroud)\n\n

===================================固定================ ====================\n在 vundle 配置中删除插件 MatchTagAlways 后,问题已修复。以下是我发现问题的步骤:

\n\n
    \n
  1. 首先,你需要知道哪个配置区域导致了问题,对我来说,是Vundle的配置。
  2. \n
  3. 添加:重画!在调用 vundle#begin() 和调用 vundle#end() 之后
  4. \n
  5. 打开vim,它会在按回车消息上方显示错误消息
  6. \n
\n\n

前:

\n\n

按 ENTER 或键入命令继续

\n\n

后:

\n\n

MatchTag始终不可用:需要 python。

\n\n

按 ENTER 或键入命令继续

\n\n
    \n
  1. 现在我们找到了根本原因。修复它,或删除插件。
  2. \n
\n\n

ps: gvim 有 +python3/dyn 支持,但 vim 没有。所以如果安装了插件 MatchTagAlways,vim 就会出现错误。

\n

tes*_*ter 3

set shortmess=a.vimrc应该停止那样的行为。

这个 wiki 似乎是这个问题的权威:

http://vim.wikia.com/wiki/Avoiding_the_%22Hit_ENTER_to_continue%22_prompts