Bram Moolenaar | a6c27c4 | 2019-05-09 19:16:22 +0200 | [diff] [blame] | 1 | " Vim filetype plugin |
| 2 | " Language: roff(7) |
Bram Moolenaar | 23515b4 | 2020-11-29 14:36:24 +0100 | [diff] [blame] | 3 | " Maintainer: Aman Verma |
| 4 | " Homepage: https://github.com/a-vrma/vim-nroff-ftplugin |
Wu, Zhenyu | 8f3277f | 2025-02-12 20:58:57 +0100 | [diff] [blame] | 5 | " Document: https://www.gnu.org/software/groff/manual/groff.html |
Riley Bruins | 0a08306 | 2024-06-03 20:40:45 +0200 | [diff] [blame] | 6 | " Previous Maintainer: Chris Spiegel <cspiegel@gmail.com> |
Wu, Zhenyu | 8f3277f | 2025-02-12 20:58:57 +0100 | [diff] [blame] | 7 | " Last Changes: |
| 8 | " 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring' #14843) |
| 9 | " 2025 Feb 12 by Wu, Zhenyu <wuzhenyu@ustc.edu> (matchit configuration #16619) |
Bram Moolenaar | a6c27c4 | 2019-05-09 19:16:22 +0200 | [diff] [blame] | 10 | |
| 11 | if exists("b:did_ftplugin") |
| 12 | finish |
| 13 | endif |
| 14 | let b:did_ftplugin = 1 |
| 15 | |
Riley Bruins | 0a08306 | 2024-06-03 20:40:45 +0200 | [diff] [blame] | 16 | setlocal commentstring=.\\\"\ %s |
Bram Moolenaar | 23515b4 | 2020-11-29 14:36:24 +0100 | [diff] [blame] | 17 | setlocal comments=:.\\\" |
| 18 | setlocal sections+=Sh |
Wu, Zhenyu | 8f3277f | 2025-02-12 20:58:57 +0100 | [diff] [blame] | 19 | setlocal define=.\s*de |
Bram Moolenaar | 23515b4 | 2020-11-29 14:36:24 +0100 | [diff] [blame] | 20 | |
Wu, Zhenyu | 8f3277f | 2025-02-12 20:58:57 +0100 | [diff] [blame] | 21 | let b:undo_ftplugin = 'setlocal commentstring< comments< sections< define<' |
| 22 | |
| 23 | if exists('loaded_matchit') |
| 24 | let b:match_words = '^\.\s*ie\>:^\.\s*el\>' |
| 25 | \ . ',^\.\s*LB\>:^\.\s*LI\>:^\.\s*LE\>' |
| 26 | \ . ',^\.\s*TS\>:^\.\s*TE\>' |
| 27 | \ . ',^\.\s*PS\>:^\.\s*P[EF]\>' |
| 28 | \ . ',^\.\s*EQ\>:^\.\s*EN\>' |
| 29 | \ . ',^\.\s*[\>:^\.\s*]\>' |
| 30 | \ . ',^\.\s*FS\>:^\.\s*FE\>' |
| 31 | let b:undo_ftplugin .= "| unlet b:match_words" |
| 32 | endif |