Vim 不在编辑中加载插件 window 但在帮助或其他系统中加载它们 windows

Vim does not load plugins in edit window but loads them in help or other system windows

背景

我想使用一些 vim 插件(以前用过它)。我安装了 vundle(我的.vimrc在最下面)。

我 运行 PluginInstall 一切正常,PluginList 显示:

" My Plugins
Plugin 'VundleVim/Vundle.vim'
Plugin 'sjl/badwolf'
Plugin 'itchyny/lightline.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'junegunn/fzf'

问题

当我打开vim时,lightline 的状态栏不显示。但是,如果我这样做 :help:PluginList,这些 windows 有 lightline 的状态栏。

这让我发疯,我 uninstalled/installed vim 无数 几次了,都无济于事,所以任何帮助将不胜感激!

.vimrc

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.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'

Plugin 'sjl/badwolf'
Plugin 'itchyny/lightline.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'junegunn/fzf'
call vundle#end()            " required
filetype plugin indent on    " required

:help 'laststatus'

(在评论中,我错误地将 OP 指向 'statusline'。)

'laststatus' 'ls' number (default 1)

The value of this option influences when the last window will have a status line:

  • 0: never
  • 1: only if there are at least two windows
  • 2: always

The screen looks nicer with a status line if you have several windows, but it takes another screen line. |status-line|

默认值'laststatus'表示状态行只有至少有两个windows才会显示,一般只在最后[=]显示 31=].

要始终显示它,请添加

set laststatus=2

到你的 vimrc。