blob: 1c6d4ebc799aa6915e8d4ad83c7693064c4c9727 [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)
Eisuke Kawashimafbbaa6e2025-04-16 18:20:59 +020010" 2025 Apr 16 by Eisuke Kawashima (cpoptions #17121)
Bram Moolenaara6c27c42019-05-09 19:16:22 +020011
12if exists("b:did_ftplugin")
13 finish
14endif
15let b:did_ftplugin = 1
16
Eisuke Kawashimafbbaa6e2025-04-16 18:20:59 +020017let s:cpo_save = &cpo
18set cpo&vim
19
Riley Bruins0a083062024-06-03 20:40:45 +020020setlocal commentstring=.\\\"\ %s
Bram Moolenaar23515b42020-11-29 14:36:24 +010021setlocal comments=:.\\\"
22setlocal sections+=Sh
Wu, Zhenyu8f3277f2025-02-12 20:58:57 +010023setlocal define=.\s*de
Bram Moolenaar23515b42020-11-29 14:36:24 +010024
Wu, Zhenyu8f3277f2025-02-12 20:58:57 +010025let b:undo_ftplugin = 'setlocal commentstring< comments< sections< define<'
26
27if exists('loaded_matchit')
28 let b:match_words = '^\.\s*ie\>:^\.\s*el\>'
29 \ . ',^\.\s*LB\>:^\.\s*LI\>:^\.\s*LE\>'
30 \ . ',^\.\s*TS\>:^\.\s*TE\>'
31 \ . ',^\.\s*PS\>:^\.\s*P[EF]\>'
32 \ . ',^\.\s*EQ\>:^\.\s*EN\>'
33 \ . ',^\.\s*[\>:^\.\s*]\>'
34 \ . ',^\.\s*FS\>:^\.\s*FE\>'
35 let b:undo_ftplugin .= "| unlet b:match_words"
36endif
Eisuke Kawashimafbbaa6e2025-04-16 18:20:59 +020037
38let &cpo = s:cpo_save
39unlet s:cpo_save