From 8b7e85ab2dc7272ea2c9a49b9650b81ae498b794 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 6 May 2017 19:32:03 +0800 Subject: [PATCH] "bug: Fix startify --- config/plugins/vim-startify.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/plugins/vim-startify.vim b/config/plugins/vim-startify.vim index 03d48c723..105b01bd7 100644 --- a/config/plugins/vim-startify.vim +++ b/config/plugins/vim-startify.vim @@ -22,9 +22,6 @@ fu! s:update_logo() let g:startify_custom_header = g:_spacevim_welcome_banners[s:NUM.random(0, len(g:_spacevim_welcome_banners))] endif endf -if !exists('g:startify_custom_header') - call s:update_logo() -endif let g:startify_session_dir = $HOME . '/.data/' . ( has('nvim') ? 'nvim' : 'vim' ) . '/session' let g:startify_files_number = 6 let g:startify_list_order = [ @@ -59,10 +56,15 @@ endf augroup startify_map au! autocmd FileType startify nnoremap - autocmd FileType startify call startify_mapping() + if !exists('g:startify_custom_header') + autocmd FileType startify call startify_mapping() + endif autocmd FileType startify setl scrolloff=0 nowrap augroup END +if !exists('g:startify_custom_header') + call s:update_logo() +endif call SpaceVim#mapping#space#def('nnoremap', ['a','s'], 'Startify', 'fancy start screen',1) " vim:set et sw=2: