Skip to content

Commit 8f3277f

Browse files
Freed-Wuchrisbra
authored andcommitted
runtime(nroff): set define option & add matchit config in ftplugin
closes: #16619 Signed-off-by: Wu, Zhenyu <[email protected]> Signed-off-by: Aman Verma <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent a9c0642 commit 8f3277f

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

runtime/ftplugin/nroff.vim

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
" Language: roff(7)
33
" Maintainer: Aman Verma
44
" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin
5+
" Document: https://www.gnu.org/software/groff/manual/groff.html
56
" Previous Maintainer: Chris Spiegel <[email protected]>
6-
" 2024 May 24 by Riley Bruins <[email protected]> ('commentstring')
7+
" Last Changes:
8+
" 2024 May 24 by Riley Bruins <[email protected]> ('commentstring' #14843)
9+
" 2025 Feb 12 by Wu, Zhenyu <[email protected]> (matchit configuration #16619)
710

811
if exists("b:did_ftplugin")
912
finish
@@ -13,5 +16,17 @@ let b:did_ftplugin = 1
1316
setlocal commentstring=.\\\"\ %s
1417
setlocal comments=:.\\\"
1518
setlocal sections+=Sh
19+
setlocal define=.\s*de
1620

17-
let b:undo_ftplugin = 'setlocal commentstring< comments< sections<'
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

0 commit comments

Comments
 (0)