Open vim-plug window in a new tab (#1274)

* Open vim-plug window in a new tab not to disrupt the current window layout
* Open preview window on the right to better show the diff

If you prefer the old layout, use the following configuration:

    let g:plug_window = 'vertical topleft new'
    let g:plug_pwindow = 'above 12new'
This commit is contained in:
Junegunn Choi
2024-03-07 01:16:12 +09:00
committed by GitHub
parent 3049761d47
commit 854b081934
4 changed files with 17 additions and 8 deletions

View File

@@ -371,6 +371,9 @@ Execute (PlugDiff - 'No updates.'):
q
Execute (New commits on remote, PlugUpdate, then PlugDiff):
let g:plug_window = 'vertical topleft new'
let g:plug_pwindow = 'above 12new'
for repo in ['seoul256.vim', 'vim-emoji']
for _ in range(2)
call system(printf('cd /tmp/vim-plug-test/junegunn/%s && git commit --allow-empty -m "update"', repo))
@@ -458,6 +461,8 @@ Execute (New commits on remote, PlugUpdate, then PlugDiff):
AssertEqual 1, &previewwindow
pclose
unlet g:plug_window g:plug_pwindow
Execute (Test g:plug_pwindow):
let g:plug_pwindow = 'below 5new'
PlugDiff
@@ -1709,6 +1714,8 @@ Execute (#530 - Comparison of incompatible git URIs):
Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com:12345/junegunn/vim-plug.git')
Execute (#532 - Reuse plug window):
let g:plug_window = 'vertical topleft new'
let g:plug_pwindow = 'above 12new'
call plug#begin()
Plug 'junegunn/goyo.vim'
call plug#end()
@@ -1735,6 +1742,8 @@ Execute (#532 - Reuse plug window):
AssertEqual 2, winnr('$'), 'Three windows after PlugStatus (but got '.winnr('$').')'
q
unlet g:plug_window g:plug_pwindow
Execute (#766 - Allow cloning into an empty directory):
let d = '/tmp/vim-plug-test/goyo-already'
call system('rm -rf ' . d)