https://github.com/lambdalisue/vim-manpager
Use Vim as a MANPAGER program
https://github.com/lambdalisue/vim-manpager
Last synced: 8 months ago
JSON representation
Use Vim as a MANPAGER program
- Host: GitHub
- URL: https://github.com/lambdalisue/vim-manpager
- Owner: lambdalisue
- License: mit
- Created: 2015-08-26T18:09:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-07-23T15:20:49.000Z (over 3 years ago)
- Last Synced: 2025-02-04T23:55:18.283Z (10 months ago)
- Language: Vim script
- Homepage:
- Size: 50.8 KB
- Stars: 66
- Watchers: 6
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# vim-manpager


[](LICENSE)
[](doc/vim-manpager.txt)
_vim-manpager_ is plugin to use Vim as a MANPAGER.
It also improve the behavior of `:Man` command and mappings in `man` file.
See [lambdalisue/vim-pager](https://github.com/lambdalisue/vim-pager) for PAGER.

## Install
```vim
" Vundle.vim
Plugin 'lambdalisue/vim-manpager'
" neobundle.vim
NeoBundle 'lambdalisue/vim-manpager'
" neobundle.vim (Lazy)
NeoBundleLazy 'lambdalisue/vim-manpager', {
\ 'autoload': {
\ 'commands': 'ASMANPAGER',
\}}
```
## Usage
To open vim via `man` command, use the following settings in your shell.
```
$ export MANPAGER="vim -c ASMANPAGER -"
$ man git
```
In Vim, you can use `Man` command to open a man page (the plugin overwrite the
default `Man` command defined in default `ftplugin/man.vim` to improve the
behavior)
```
:Man git
```
In man buffer, you can use the following keymaps
- `K` Open the manual page for the word under the cursor
- `Enter` Open the manual page for the word under the cursor
- `Ctrl-]` Open the manual page for the word under the cursor
- `2-LeftMouse` Open the manual page for the word under the cursor
- `Tab` Open next manual page in the history
- `Shift-Tab` Open previous manual page in the history
- `]t` Find next keyword and move the cursor onto
- `[t` Find previous keyword and move the cursor onto
- `q` Close the manual page