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

@@ -878,7 +878,7 @@ function! s:lastline(msg)
endfunction
function! s:new_window()
execute get(g:, 'plug_window', 'vertical topleft new')
execute get(g:, 'plug_window', '-tabnew')
endfunction
function! s:plug_window_exists()
@@ -2684,8 +2684,8 @@ function! s:preview_commit()
return
endif
if exists('g:plug_pwindow') && !s:is_preview_window_open()
execute g:plug_pwindow
if !s:is_preview_window_open()
execute get(g:, 'plug_pwindow', 'vertical rightbelow new')
execute 'e' title
else
execute 'pedit' title