From f8fc8f51c0db0137a696f65a8ba75c89c1012119 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 24 Aug 2016 11:56:33 -0400 Subject: man.vim #5249 - fix synopsis highlighting in other locales. Cannot always rely on the first line for the section in some locales; instead, use the file path and explicitly set b:man_sect to the actual section. - eliminate separate s:man_args function - simplify logic: do not reuse buffer content - introduce b:man_default_sects Fixes #5233 - introduce (man_vsplit), (man_tab) - simplify regexps --- runtime/doc/filetype.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index bbe2bbe50f..21092b7081 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -534,8 +534,11 @@ Man {path} Open the manpage specified by path. Prepend "./" if :vertical Man printf Global Mappings: -(Man) Jump to the manpage for the under the - cursor. Takes a count for the section. +(man) Jump to the manpage for the (man buffers) + or (non-man buffers) under the cursor. + Takes a count for the section. +(man_vsplit) Same as (man) but open in a vertical split. +(man_tab) Same as (man) but open in a new tab. Local mappings: K or CTRL-] Jump to the manpage for the under the @@ -547,6 +550,9 @@ q :quit if invoked as $MANPAGER, otherwise :close. Variables: *g:no_man_maps* Do not create mappings in manpage buffers. *g:ft_man_folding_enable* Fold manpages with foldmethod=indent foldnestmax=1. +*b:man_default_sects* Comma-separated, ordered list of preferred sections. + For example in C one usually wants section 3 or 2: > + :let b:man_default_sections = '3,2' PDF *ft-pdf-plugin* -- cgit