mirror of
https://github.com/junegunn/vim-plug.git
synced 2026-01-28 17:52:09 +08:00
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:
6
plug.vim
6
plug.vim
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user