File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ " Vim plugin for using Vim as manpager.
2+ " Maintainer: Enno Nagel <[email protected] >3+ " Last Change: 2016 Apr 30
4+
5+ " $MAN_PN is supposed to be set by MANPAGER, see ":help manpager.vim".
6+ if empty ($MAN_PN )
7+ finish
8+ endif
9+
10+ command ! -nargs =0 MANPAGER call s: MANPAGER () | delcommand MANPAGER
11+
12+ function ! s: MANPAGER ()
13+ let page_pattern = ' \v\w+%([-_.]\w+)*'
14+ let sec_pattern = ' \v\w+%(\+\w+)*'
15+ let pagesec_pattern = ' \v(' . page_pattern . ' )\((' . sec_pattern . ' )\)'
16+
17+ if $MAN_PN is ' 1'
18+ let manpage = matchstr ( getline (1 ), ' ^' . pagesec_pattern )
19+ else
20+ let manpage = expand (' $MAN_PN' )
21+ endif
22+
23+ let page_sec = matchlist ( manpage, ' ^' . pagesec_pattern . ' $' )
24+
25+ bwipe!
26+
27+ setlocal filetype = man
28+ exe ' Man' page_sec[3 ] page_sec[1 ]
29+ endfunction
Original file line number Diff line number Diff line change @@ -753,6 +753,8 @@ static char *(features[]) =
753753
754754static int included_patches [] =
755755{ /* Add new patch number below this line */
756+ /**/
757+ 1804 ,
756758/**/
757759 1803 ,
758760/**/
You can’t perform that action at this time.
0 commit comments