Home Explore Blog CI



neovim

11th chunk of `runtime/doc/filetype.txt`
defeb914a8760dd2bf7b1a3753b826ea61aee515f39307b30000000100000fa0

<LocalLeader>q   or   \MailQuote
	Quotes the text selected in Visual mode, or from the cursor position
	to the end of the file in Normal mode.  This means "> " is inserted in
	each line.

MAN					*ft-man-plugin* *:Man* *man.lua*

View manpages in Nvim. Supports highlighting, completion, locales, and
navigation. Also see |find-manpage|.

man.lua will always attempt to reuse the closest man window (above/left) but
otherwise create a split.

The case sensitivity of completion is controlled by 'fileignorecase'.

Commands:
Man {name}                Display the manpage for {name}.
Man {sect} {name}         Display the manpage for {name} and section {sect}.
Man {name}({sect})        Same as above.
Man {sect} {name}({sect}) Used during completion to show the real section of
                          when the provided section is a prefix, e.g. 1m vs 1.
Man {path}                Open the manpage at {path}. Prepend "./" if {path}
                          is relative to the current directory.
Man                       Open the manpage for the <cWORD> (man buffers)
                          or <cword> (non-man buffers) under the cursor.
Man!                      Display the current buffer contents as a manpage.

|:Man| accepts command modifiers. For example, to use a vertical split: >vim
    :vertical Man printf
To reuse the current window: >vim
    :hide Man printf

Local mappings:
K or CTRL-]               Jump to the manpage for the <cWORD> under the
                          cursor. Takes a count for the section.
CTRL-T                    Jump back to the location that the manpage was
                          opened from.
gO                        Show the manpage outline. |gO|
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'
*g:man_hardwrap*            Hard-wrap to $MANWIDTH or window width if $MANWIDTH is
                          empty or larger than the window width. Enabled by
                          default. Set |FALSE| to enable soft wrapping.

To use Nvim as a manpager: >bash
    export MANPAGER='nvim +Man!'

Note: when running `man` from the shell with Nvim as `$MANPAGER`, `man` will
pre-format the manpage using `groff`, and Nvim will display the manual page as
it was received from stdin (it can't "undo" the hard-wrap caused by
man/groff). To prevent man/groff from hard-wrapping the manpage, you can set
`$MANWIDTH=999` in your environment.

To disable bold highlighting: >vim
    :highlight link manBold Normal

Troubleshooting:

If you see an error like: >
    fuse: mount failed: Permission denied
this may be caused by AppArmor sandboxing. To fix this, add a local override
in e.g. `/etc/apparmor.d/local/usr.bin.man`: >bash
    mount fstype=fuse.nvim options=(ro, nosuid, nodev) -> /tmp/**,
    /usr/bin/fusermount Ux,
See also https://github.com/neovim/neovim/issues/30268 .

MARKDOWN						*ft-markdown-plugin*

To enable folding use this: >
	let g:markdown_folding = 1

'expandtab' will be set by default.  If you do not want that use this: >
	let g:markdown_recommended_style = 0


ORG							*ft-org-plugin*

To enable folding use this: >
	let g:org_folding = 1
<

PDF							*ft-pdf-plugin*

Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
the PDF.  The following are treated as tags:

- The byte offset after "startxref" to the xref table
- The byte offset after the /Prev key in the trailer to an earlier xref table
- A line of the form "0123456789 00000 n" in the xref table
- An object reference like "1 0 R" anywhere in the PDF

These maps can be disabled with >
	:let g:no_pdf_maps = 1

PLSQL	

Title: Manpage Viewer, Markdown and Org Folding, and PDF Navigation in Vim
Summary
This section details the Man plugin for viewing manpages in Nvim, including commands for displaying manpages with specific sections and the use of Nvim as a manpager via the `$MANPAGER` environment variable. It covers local mappings for jumping to manpages and navigating back, along with variables to control folding and hard-wrapping. It also provides troubleshooting tips for potential issues, such as AppArmor sandboxing. The section then briefly mentions enabling folding for Markdown and Org files using `g:markdown_folding` and `g:org_folding`. Finally, it describes navigation within PDF files using `<C-]>` and `<C-T>` to simulate a tag stack, which can be disabled using `g:no_pdf_maps`.