5

VIM は「Press ENTER or type command to continue」というメッセージで開始します。これは VIM では発生しますが、GVIM では発生しません。GVIM は「Press ENTER or type command to continue」を表示せずに起動します。

私の .vimrc ファイルの Vundle 設定、OS は 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

それなら大丈夫です!Enter キーを押すプロンプトを表示せずに 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!

=================================固定================ ==================== バンドル構成でプラグイン MatchTagAlways を削除した後、問題が修正されました。以下は、問題を見つけた手順です。

  1. まず、問題の原因となっている構成領域を知る必要があります。私にとっては、それは Vundle の構成です。
  2. 追加:再描画! vundle#begin() を呼び出し、vundle#end() を呼び出した後
  3. vimを開くと、Enterキーを押すメッセージの上にエラーメッセージが表示されます

前:

Enter キーを押すか、コマンドを入力して続行します

後:

MatchTag常に使用不可: Python が必要です。

Enter キーを押すか、コマンドを入力して続行します

  1. これで根本原因がわかりました。修正するか、プラグインを削除してください。

ps: gvim は +python3/dyn をサポートしていますが、vim はサポートしていません。そのため、プラグイン MatchTagAlways がインストールされている場合、vim にエラーが発生します。

4

1 に答える 1

1

set shortmess=aあなた.vimrcはそれをやめるべきです。

この wiki がこの問題の権威のようです:

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

于 2016-01-13T08:31:21.393 に答える