nvim-man


Ⅰ. 插件描述

View man pages in neovim

Ⅱ. 基本信息

创建日期:  2015-01-16
使用用户:  3
Github星:  2
插件作者:  Kevin Velghe

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'paretje/nvim-man'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'paretje/nvim-man'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'paretje/nvim-man'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/paretje/nvim-man

Ⅳ. 文档说明

# nvim-man
View man pages in neovim.

Features and Usage

Viewing man pages

  • :Man printf - open printf(1) man page in a split
  • :Vman 3 putc - open putc(3) man page in a vertical split (read more
    here on what the

manual page numbers mean, they are really useful)

  • :Man pri<Tab> - command completion for man page names
  • :Man 3 pri<Tab> - completion "respects" the man page section argument
  • :Man 6 <Ctrl-D> - list all man pages from section 6

Configuration

  • au User ManOpen can be used to define, for example, custom bindings
  • let g:nvim_man_default_target can be used to set an alternative default target
    when opening the manual. Possible values are: horizontal, vertical, tab

and current. By default, a vertical split is used.

Installation

Just use your favorite plugin manager.

Contributing

Contributions and bug fixes are welcome. If you have an idea for a new feature
please get in touch by opening an issue so we can discuss it first.

Differences with vim-man

This plugin is based on vim-man, which
is turn is based on the builtin viewer of vim. Neovim does enable this viewer
by default. There are howerver some limitations with both vim-man and the
builtin viewer. The builtin viewer has no auto completion on the vim command
mode, and both do load the man page as a plain text file with syntax

  1. This syntax highlighting isn't perfect however, as it sometimes
    fails, and not everything is highlighted which would be for example bold in the

man command.

As neovim has it's terminal command, this can be used to view the man page. On
top of that, this plugin applies the syntax highlighting. C-w is available
without leaving terminal mode, making it easier to switch to different window.
When returning to the man page, the buffer automatically enters terminal mode.

Compared to vim-man, this plugin doesn't provide the Mangrep command, as this
is currently broken in neovim. A fix should be trivial, but as I think it's too
slow to be useful anyway, I deleted it for now. If anyone wants to fix it, the
removal could be reverted. Note however that you can't use vim-man in
combination with this plugin.

Credits

Thanks to vim-man for the completion code, and vim and neovim for the syntax
and vim/neovim itself, of course.

License

Vim license, see :help license.

添加新评论