startify.vim 1.3 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("b:current_syntax")
  7. finish
  8. endif
  9. let s:sep = startify#get_separator()
  10. syntax sync fromstart
  11. syntax match StartifySpecial /\V<empty buffer>\|<quit>/
  12. syntax match StartifyBracket /\[\|\]/
  13. syntax match StartifyNumber /\[[^BSV]\+\]/hs=s+1,he=e-1 contains=StartifyBracket
  14. syntax match StartifyFile /.*/ contains=StartifyBracket,StartifyNumber,StartifyPath,StartifySpecial
  15. execute 'syntax match StartifySlash /\'. s:sep .'/'
  16. execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash'
  17. if exists('g:startify_custom_header')
  18. execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
  19. endif
  20. if exists('g:startify_custom_footer')
  21. autocmd startify User Startified
  22. \ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/' |
  23. \ autocmd! startify User
  24. endif
  25. highlight default link StartifyHeader Normal
  26. highlight default link StartifyFooter Normal
  27. highlight default link StartifyBracket Delimiter
  28. highlight default link StartifyNumber Number
  29. highlight default link StartifySection Special
  30. let b:current_syntax = 'startify'