From 44f876f4e9c95d86033257fcd85f71fc4d5f90d0 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 4 Mar 2016 10:49:11 +0100 Subject: [PATCH] FAQ: There is an empty window with vim-plug! --- doc/startify.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/startify.txt b/doc/startify.txt index e9f3382..32e0905 100644 --- a/doc/startify.txt +++ b/doc/startify.txt @@ -621,6 +621,7 @@ FAQ *startify-faq* |startify-faq-09| tmux-resurrect? |startify-faq-10| Temporarily skip Startify at start? |startify-faq-11| How to use the output of a command as header? + |startify-faq-12| There is an empty window with vim-plug! ------------------------------------------------------------------------------ *startify-faq-01* @@ -760,6 +761,39 @@ How to use the output of a command as header?~ Then we shift each string to the right by 10 spaces. Afterwards we add an empty string to the list, which results in an empty line in the header. +------------------------------------------------------------------------------ + *startify-faq-12* +There is an empty window with vim-plug!~ + +After start there might be only the Startify buffer which is marked as +|unlisted-buffer|. The problem arises if you use :PlugUpdate followed by 'D' +to see the changes. An empty window! + +The actual problem is that Vim won't close the last listed buffer. Try this: +> + $ vim -u NONE -N + :set nobuflisted + :new + :bd +< +It won't close the buffer and therefore the window. This also happens in +vim-plug. Note that this is no bug in neither plugin, it's a Vim weirdness. + +Workaround #1:~ +> + autocmd User Startified setlocal buflisted +< +In some cases this could break other plugins at start (I look at you +NERDTree), but works well most of the time. + +Workaround #2:~ +> + let g:plug_window = 'enew' " or maybe 'tabnew' +< +This will open the plug buffer in the current window instead of creating a new +window on the left side. Mind that this will also close the Startify buffer +since it will be hidden. + ============================================================================== EXAMPLE *startify-example*