startify.vim 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 * nested
  13. \ if !argc() && (line2byte('$') == -1) && (v:progname =~? '^[-gmnq]\=vim\=x\=\%[\.exe]$')
  14. \ | if get(g:, 'startify_session_autoload') && filereadable('Session.vim')
  15. \ | source Session.vim
  16. \ | else
  17. \ | call startify#insane_in_the_membrane()
  18. \ | endif
  19. \ | endif
  20. \ | autocmd! startify VimEnter
  21. endif
  22. if get(g:, 'startify_session_persistence')
  23. autocmd startify VimLeave *
  24. \ if exists('v:this_session') && filewritable(v:this_session)
  25. \ | call startify#session_write(fnameescape(v:this_session))
  26. \ | endif
  27. endif
  28. augroup END
  29. command! -nargs=? -bar -complete=customlist,startify#session_list SSave call startify#session_save(<f-args>)
  30. command! -nargs=? -bar -complete=customlist,startify#session_list SLoad call startify#session_load(<f-args>)
  31. command! -nargs=? -bar -complete=customlist,startify#session_list SDelete call startify#session_delete(<f-args>)
  32. command! -nargs=0 -bar SClose call startify#session_close()
  33. command! -nargs=0 -bar Startify call startify#insane_in_the_membrane()
  34. nnoremap <silent><plug>(startify-open-buffers) :<c-u>call startify#open_buffers()<cr>