vim-superman


Ⅰ. 插件描述

Read Unix man pages faster than a speeding bullet!

Ⅱ. 基本信息

创建日期:  2014-12-21
使用用户:  181
Github星:  137
插件作者:  Jake Zimmerman

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vim SuperMan

Read Unix man pages faster than a speeding bullet!

Unix man pages by default open with the less pager. Getting them to open with
Vim can be a little bit of a pain, but in recent versions of Vim there's a
plugin ($VIMRUNTIME/ftplugin/man.vim) that makes this easy.

This is a simple Vim plugin and sh function that makes replacing man from the
command line a cinch.

Installation

Use your favorite plugin manager. If you don't have one, I'd recommend Vundle,
though you should probably also take a look at Pathogen, as it's more common.

# if your ~/.vim folder isn't under source control:
git clone https://github.com/jez/vim-superman ~/.vim/bundle/vim-superman

# if your ~/.vim folder is under source control:
git submodule add https://github.com/jez/vim-superman ~/.vim/bundle/vim-superman

Then, add the following to your .bashrc, .bash_profile, .zshrc, or
whatever file you use to configure your shell:

export PATH="$PATH:$HOME/.vim/bundle/vim-superman/bin"

(Note: you'll have to change this location if you installed Vim SuperMan
somewhere else.)

Close and reopen your terminal and you're set! You can even add

compdef vman="man"

to your ~/.zshrc or

complete -o default -o nospace -F _man vman

to your ~/.bashrc to get tab completion. (Thanks to texasflood for the Bash
completion snippet.)

Usage

This predominantly a command line tool. To open the man page for vim:

$ vman vim

vman vim

It's that simple. The underlying :Man command supports specifying a specific
section, so you could also do something like

$ vman 3 printf

To see the man page for the C printf() library call.

vman 3 printf

FAQ

For more information, see the associated blog post.

Jake, why not just name the bash function man?

The actual man command supports many more features than the Vim plugin does
(for a complete list, see man(1)). If you shadow the real man command,
things start to break, for example apropos, which uses man under the hood.

When I install vim-superman it looks nothing like this!

There are a couple other plugins of mine featured prominently here, including
Solarized Dark for the color scheme and Vim Airline for the

  1. If you're curious about my whole setup, be sure to check out my
    dotfiles repository.

License

MIT License. See LICENSE.

添加新评论