startify.vim 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. " Plugin: https://github.com/mhinz/vim-startify
  2. " Description: Start screen displaying recently used stuff.
  3. " Maintainer: Marco Hinz <http://github.com/mhinz>
  4. " Version: 1.8
  5. if exists("b:current_syntax")
  6. finish
  7. endif
  8. let s:sep = startify#get_separator()
  9. syntax sync fromstart
  10. syntax match StartifySpecial /\V<empty buffer>\|<quit>/
  11. syntax match StartifyBracket /\[\|\]/
  12. syntax match StartifyNumber /\[[^BSV]\+\]/hs=s+1,he=e-1 contains=StartifyBracket
  13. syntax match StartifyFile /.*/ contains=StartifyBracket,StartifyNumber,StartifyPath,StartifySpecial
  14. execute 'syntax match StartifySlash /\'. s:sep .'/'
  15. execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash'
  16. if exists('g:startify_custom_header')
  17. execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
  18. endif
  19. if exists('g:startify_custom_footer')
  20. autocmd startify User <buffer>
  21. \ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/' |
  22. \ autocmd! startify User <buffer>
  23. endif
  24. highlight default link StartifyHeader Normal
  25. highlight default link StartifyBracket Delimiter
  26. highlight default link StartifyNumber Number
  27. let b:current_syntax = 'startify'
  28. " vim: et sw=2 sts=2