blob: 7d3d2a597f5a3bc8aa33de6d557442e2ec83b323 [file] [log] [blame]
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001" Vim filetype plugin
2" Language: roff(7)
Bram Moolenaar23515b42020-11-29 14:36:24 +01003" Maintainer: Aman Verma
4" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin
Wu, Zhenyu8f3277f2025-02-12 20:58:57 +01005" Document: https://www.gnu.org/software/groff/manual/groff.html
Riley Bruins0a083062024-06-03 20:40:45 +02006" Previous Maintainer: Chris Spiegel <cspiegel@gmail.com>
Wu, Zhenyu8f3277f2025-02-12 20:58:57 +01007" 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 Moolenaara6c27c42019-05-09 19:16:22 +020010
11if exists("b:did_ftplugin")
12 finish
13endif
14let b:did_ftplugin = 1
15
Riley Bruins0a083062024-06-03 20:40:45 +020016setlocal commentstring=.\\\"\ %s
Bram Moolenaar23515b42020-11-29 14:36:24 +010017setlocal comments=:.\\\"
18setlocal sections+=Sh
Wu, Zhenyu8f3277f2025-02-12 20:58:57 +010019setlocal define=.\s*de
Bram Moolenaar23515b42020-11-29 14:36:24 +010020
Wu, Zhenyu8f3277f2025-02-12 20:58:57 +010021let b:undo_ftplugin = 'setlocal commentstring< comments< sections< define<'
22
23if 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"
32endif