startify.vim 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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("b:current_syntax")
  7. finish
  8. endif
  9. let s:sep = startify#get_separator()
  10. syntax sync fromstart
  11. syntax match StartifyBracket /.*\%9c/ contains=
  12. \ StartifyNumber,
  13. \ StartifySelect,
  14. syntax match StartifySpecial /\V<empty buffer>\|<quit>/
  15. syntax match StartifyNumber /^\s*\[\zs[^BSVT]\{-}\ze\]/
  16. syntax match StartifySelect /^\s*\[\zs[BSVT]\{-}\ze\]/
  17. syntax match StartifyFile /.*/ contains=
  18. \ StartifyBracket,
  19. \ StartifyPath,
  20. \ StartifySpecial,
  21. execute 'syntax match StartifySlash /\'. s:sep .'/'
  22. execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash'
  23. if exists('g:startify_custom_header')
  24. execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
  25. endif
  26. if exists('g:startify_custom_footer')
  27. autocmd startify User Startified
  28. \ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/'
  29. endif
  30. highlight default link StartifyBracket Delimiter
  31. highlight default link StartifyFile Identifier
  32. highlight default link StartifyFooter Title
  33. highlight default link StartifyHeader Title
  34. highlight default link StartifyNumber Number
  35. highlight default link StartifyPath Directory
  36. highlight default link StartifySection Statement
  37. highlight default link StartifySelect Title
  38. highlight default link StartifySlash Delimiter
  39. highlight default link StartifySpecial Comment
  40. let b:current_syntax = 'startify'