문제가 좀 있어요빔 전력선끼워 넣다. 설치했는데 두 버퍼를 모두 열 때만 작동합니다. 아래에는 문제와 내 문제를 시각적으로 설명하는 사진이 있습니다 .vimrc
. 제가 잘못 구성한 걸까요?
단일 버퍼
두 개의 버퍼
.vimrc
콘텐츠
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
" Also don't do it when the mark is in the first line, that is the default
" position when opening a file.
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
if !exists(":DiffOrig")
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
endif
if has('langmap') && exists('+langnoremap')
" Prevent that the langmap option applies to characters that result from a
" mapping. If unset (default), this may break plugins (but it's backward
" compatible).
set langnoremap
endif
" Set tab width stuff
set tabstop=4 softtabstop=0 noexpandtab shiftwidth=4
" Set to use spaces in git commits
autocmd FileType gitcommit setlocal tabstop=4 softtabstop=0 expandtab shiftwidth=4
" Show invisibles
set list
" Set invisibles
set lcs=eol:$,tab:»·,trail:×,extends:…,precedes:…
" Solarized colors
syntax enable
set background=dark
colorscheme solarized
" Powerline
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
그만한 가치가 있으므로 사용하고 있습니다.종이(일부 추가 기능이 있는 Cygwin) Windows 7.
답변1
저는 Vim이 단일 창에 대한 상태 표시줄을 표시하지 않고 두 개의 창이 열려 있을 때만 표시한다는 것을 알게 되었습니다. set laststatus=2
에 이를 포함하여 재정의 할 수 있으며 .vimrc
, 그러면 상태가 항상 표시됩니다.