Bram Moolenaar | 8c1b8cb | 2022-06-14 17:41:28 +0100 | [diff] [blame] | 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 | |
| 9 | " Only do this when not done yet for this buffer |
| 10 | if exists('b:did_ftplugin') |
| 11 | finish |
| 12 | endif |
| 13 | let b:did_ftplugin = 1 |
| 14 | |
| 15 | setlocal foldtext=TAPTestLine_foldtext() |
| 16 | function! TAPTestLine_foldtext() |
| 17 | let line = getline(v:foldstart) |
| 18 | let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g') |
| 19 | return sub |
| 20 | endfunction |
| 21 | |
| 22 | setlocal foldminlines=5 |
| 23 | setlocal foldcolumn=2 |
| 24 | setlocal foldenable |
| 25 | setlocal foldmethod=syntax |
| 26 | |
| 27 | let b:undo_ftplugin = 'setlocal foldtext< foldminlines< foldcolumn< foldenable< foldmethod<' |