startify.vim 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 <buffer>
  22. \ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/' |
  23. \ autocmd! startify User <buffer>
  24. endif
  25. highlight default link StartifyHeader Normal
  26. highlight default link StartifyBracket Delimiter
  27. highlight default link StartifyNumber Number
  28. let b:current_syntax = 'startify'