Mercurial > vim
comparison runtime/doc/filetype.txt @ 23047:29c5f168c6fd
Update runtime files
Commit: https://github.com/vim/vim/commit/23515b4ef7580af8b9d3b964a558ab2007cacda5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 29 14:36:24 2020 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 Nov 2020 14:45:04 +0100 |
parents | a3bb84cd0f59 |
children | 96206643bd9f |
comparison
equal
deleted
inserted
replaced
23046:9a30b28b8154 | 23047:29c5f168c6fd |
---|---|
561 to the end of the file in Normal mode. This means "> " is inserted in | 561 to the end of the file in Normal mode. This means "> " is inserted in |
562 each line. | 562 each line. |
563 | 563 |
564 MAN *ft-man-plugin* *:Man* *man.vim* | 564 MAN *ft-man-plugin* *:Man* *man.vim* |
565 | 565 |
566 Displays a manual page in a nice way. Also see the user manual | 566 This plugin displays a manual page in a nice way. See |find-manpage| in the |
567 |find-manpage|. | 567 user manual for more information. |
568 | 568 |
569 To start using the ":Man" command before any manual page was loaded, source | 569 To start using the |:Man| command before any manual page has been loaded, |
570 this script from your startup vimrc file: > | 570 source this script from your startup |vimrc| file: > |
571 | |
572 runtime ftplugin/man.vim | 571 runtime ftplugin/man.vim |
573 | 572 |
574 Options: | 573 Options: |
575 'iskeyword' the '.' character is added to be able to use CTRL-] on the | 574 'iskeyword' The '.' character is added to support the use of CTRL-] on the |
576 manual page name. | 575 manual page name. |
577 | 576 |
578 Commands: | 577 Commands: |
579 Man {name} Display the manual page for {name} in a window. | 578 Man {name} Display the manual page for {name} in a window. |
580 Man {number} {name} | 579 Man {number} {name} |
581 Display the manual page for {name} in a section {number}. | 580 Display the manual page for {name} in a section {number}. |
582 | 581 |
583 Global mapping: | 582 Global mapping: |
584 <Leader>K Displays the manual page for the word under the cursor. | 583 <Leader>K Displays the manual page for the word under the cursor. |
585 <Plug>ManPreGetPage idem, allows for using a mapping: > | 584 <Plug>ManPreGetPage |
586 nmap <F1> <Plug>ManPreGetPage<CR> | 585 idem, allows for using a mapping: > |
586 nmap <F1> <Plug>ManPreGetPage | |
587 | 587 |
588 Local mappings: | 588 Local mappings: |
589 CTRL-] Jump to the manual page for the word under the cursor. | 589 CTRL-] Jump to the manual page for the word under the cursor. |
590 CTRL-T Jump back to the previous manual page. | 590 CTRL-T Jump back to the previous manual page. |
591 q Same as ":quit" | 591 q Same as the |:quit| command. |
592 | 592 |
593 To use a vertical split instead of horizontal: > | 593 To use a vertical split instead of horizontal: > |
594 let g:ft_man_open_mode = 'vert' | 594 let g:ft_man_open_mode = 'vert' |
595 To use a new tab: > | 595 To use a new tab: > |
596 let g:ft_man_open_mode = 'tab' | 596 let g:ft_man_open_mode = 'tab' |
597 | 597 |
598 To enable folding use this: > | 598 To enable |folding|, use this: > |
599 let g:ft_man_folding_enable = 1 | 599 let g:ft_man_folding_enable = 1 |
600 If you do not like the default folding, use an autocommand to add your desired | 600 If you do not like the default folding, use an |autocommand| to add your desired |
601 folding style instead. For example: > | 601 folding style instead. For example: > |
602 autocmd FileType man setlocal foldmethod=indent foldenable | 602 autocmd FileType man setlocal foldmethod=indent foldenable |
603 | 603 |
604 If you would like :Man {number} {name} to behave like man {number} {name} by | 604 If you would like :Man {number} {name} to behave like man {number} {name} by |
605 not running man {name} if no page is found, then use this: > | 605 not running man {name} if no page is found, then use this: > |
606 let g:ft_man_no_sect_fallback = 1 | 606 let g:ft_man_no_sect_fallback = 1 |
607 | 607 |
610 set keywordprg=:Man | 610 set keywordprg=:Man |
611 | 611 |
612 | 612 |
613 MANPAGER *manpager.vim* | 613 MANPAGER *manpager.vim* |
614 | 614 |
615 The :Man command allows you to turn Vim into a manpager (that syntax highlights | 615 The |:Man| command allows you to turn Vim into a manpager (that syntax highlights |
616 manpages and follows linked manpages on hitting CTRL-]). | 616 manpages and follows linked manpages on hitting CTRL-]). |
617 | 617 |
618 For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...) | 618 For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...) |
619 | 619 |
620 export MANPAGER="vim -M +MANPAGER -" | 620 export MANPAGER="vim -M +MANPAGER -" |