tap.vim 815 B

12345678910111213141516171819202122232425262728
  1. " Vim filetype plugin file
  2. " Language: Verbose TAP Output
  3. " Maintainer: vim-perl <vim-perl@googlegroups.com>
  4. " Homepage: https://github.com/vim-perl/vim-perl
  5. " Bugs/requests: https://github.com/vim-perl/vim-perl/issues
  6. " License: Vim License (see :help license)
  7. " Last Change: 2021 Oct 22
  8. " Only do this when not done yet for this buffer
  9. if exists('b:did_ftplugin')
  10. finish
  11. endif
  12. let b:did_ftplugin = 1
  13. setlocal foldtext=TAPTestLine_foldtext()
  14. function! TAPTestLine_foldtext()
  15. let line = getline(v:foldstart)
  16. let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
  17. return sub
  18. endfunction
  19. setlocal foldminlines=5
  20. setlocal foldcolumn=2
  21. setlocal foldenable
  22. setlocal foldmethod=syntax
  23. let b:undo_ftplugin = 'setlocal foldtext< foldminlines< foldcolumn< foldenable< foldmethod<'