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

标签 vim enter vundle

VIM 以消息“Press ENTER or type command to continue”开头,VIM 会发生这种情况,但 GVIM 不会,GVIM 启动时不显示“Press ENTER or type command to continue”。

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

"""""""""""""""""""""""""""Vundle start"""""""""""""""""""""""""""""""""
" set the runtime path to include Vundle and initialize
set rtp+=C:/Users/penpan/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

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

我评论这一行:
call vundle#end()            " required

然后就OK了! VIM 启动时不显示按回车提示。所以我相信这个电话会让提示发生。我加沉默!在它前面如下:
silent! call vundle#end()

但是没有用,VIM 仍然显示提示。
并在 .vimrc 中添加以下内容:
set shortmess+=T
set cmdheight=2

不起作用。

我试图在谷歌上找到答案,很多建议都很好,但没有一个工作:(

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

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

仅当我在下面删除时,按 Enter 提示才会消失:
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
""""""""""""""""""""""""""""End Vundle"""""""""""""""""""""""""""""""""
colorscheme molokai "because molokai is installed by Vundle, so it only work after Vundle is lunched!

==================================固定============== ====================
在 vundle 配置中删除插件 MatchTagAlways 后,问题已修复。以下是我发现问题的步骤:
  • 首先,你需要知道是哪个配置区域导致了这个问题,对我来说,它是 Vundle 的配置。
  • 添加:重绘!在调用 vundle#begin() 和调用 vundle#end() 之后
  • 打开vim,它会在按回车信息上方显示错误信息

  • 前:

    按 ENTER 或键入命令继续

    后:

    MatchTag 始终不可用:需要 python。

    按 ENTER 或键入命令继续
  • 现在我们找到了根本原因。修复它,或删除插件。

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

    最佳答案

    set shortmess=a在您的 .vimrc应该停止。

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

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

    关于Vim 启动时显示 "Press ENTER or type command to continue”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34739736/

    相关文章:

    ubuntu - 支持系统剪贴板的 VIM 版本(在终端中)

    javascript - 模拟 'ENTER' 按键,就像人类在网站上点击一样

    android - 使用软键盘上的 “ENTER” 键发起事件

    git - GnuTLS接收错误(-110): The TLS connection was non-properly terminated

    vim - 如何在 Vim 中逐行而不是逐段滚动屏幕?

    vim - Vim 如何猜测 xterm 上的背景颜色?

    java - Enter 键按下的行为类似于 JSF 中的提交

    vim - Vundle 没有正确安装插件

    git - 安装 Vundle 后 Vim 错误 1187(无法获取 defaults.vim 文件)

    ubuntu - 尝试编译 'make' 自定义配置 vim 将不起作用