startify.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. " vim: et sw=2 sts=2
  2. " Plugin: https://github.com/mhinz/vim-startify
  3. " Description: Start screen displaying recently used stuff.
  4. " Maintainer: Marco Hinz <http://github.com/mhinz>
  5. " Version: 1.8
  6. if exists('g:loaded_startify') || &cp
  7. finish
  8. endif
  9. let g:loaded_startify = 1
  10. augroup startify
  11. if !get(g:, 'startify_disable_at_vimenter')
  12. autocmd VimEnter *
  13. \ if !argc() && (line2byte('$') == -1) && (v:progname =~? '^[gmnq]\=vim\=x\=\%[\.exe]$')
  14. \ | call startify#insane_in_the_membrane()
  15. \ | endif
  16. \ | autocmd! startify VimEnter
  17. endif
  18. if get(g:, 'startify_session_persistence')
  19. autocmd startify VimLeave *
  20. \ if exists('v:this_session') && filewritable(v:this_session)
  21. \ | call startify#session_write(fnameescape(v:this_session))
  22. \ | endif
  23. endif
  24. augroup END
  25. command! -nargs=? -bar -complete=customlist,startify#session_list SSave call startify#session_save(<f-args>)
  26. command! -nargs=? -bar -complete=customlist,startify#session_list SLoad call startify#session_load(<f-args>)
  27. command! -nargs=? -bar -complete=customlist,startify#session_list SDelete call startify#session_delete(<f-args>)
  28. command! -nargs=0 -bar Startify call startify#insane_in_the_membrane()
  29. nnoremap <silent><plug>(startify-open-buffers) :<c-u>call startify#open_buffers()<cr>