diff --git a/autoload/startify.vim b/autoload/startify.vim index 74c027c..d949596 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -41,10 +41,9 @@ function! startify#get_lastline() abort endfunction " Function: #insane_in_the_membrane {{{1 -function! startify#insane_in_the_membrane() abort +function! startify#insane_in_the_membrane(on_vimenter) abort " Handle vim -y, vim -M. - if &insertmode - \ || (!&modifiable && &buftype != 'terminal' && &filetype != 'startify') + if a:on_vimenter && (&insertmode || !&modifiable) return endif diff --git a/plugin/startify.vim b/plugin/startify.vim index 70f68d2..db54fa5 100644 --- a/plugin/startify.vim +++ b/plugin/startify.vim @@ -37,7 +37,7 @@ function! s:on_vimenter() if get(g:, 'startify_session_autoload') && filereadable('Session.vim') source Session.vim elseif !get(g:, 'startify_disable_at_vimenter') - call startify#insane_in_the_membrane() + call startify#insane_in_the_membrane(1) endif endif if get(g:, 'startify_update_oldfiles') @@ -60,7 +60,7 @@ command! -nargs=? -bar -complete=customlist,startify#session_list SLoad command! -nargs=? -bar -bang -complete=customlist,startify#session_list SSave call startify#session_save(0, ) command! -nargs=? -bar -bang -complete=customlist,startify#session_list SDelete call startify#session_delete(0, ) command! -nargs=0 -bar SClose call startify#session_close() -command! -nargs=0 -bar Startify call startify#insane_in_the_membrane() +command! -nargs=0 -bar Startify call startify#insane_in_the_membrane(0) command! -nargs=0 -bar StartifyDebug call startify#debug() nnoremap (startify-open-buffers) :call startify#open_buffers()