spacevim/bundle/vim-van/README.md
JIe 2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
init
2024-08-21 14:17:26 +08:00

88 lines
2.4 KiB
Markdown

# 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.
```bash
# if your ~/.vim folder isn't under source control:
git clone https://github.com/Z1MM32M4N/vim-superman ~/.vim/bundle/
# if your ~/.vim folder is under source control:
git submodule add https://github.com/Z1MM32M4N/vim-superman ~/.vim/bundle/
```
Then, add the following to your `.bashrc`, `.bash_profile`, `.zshrc`, or
whatever file you use to configure your shell:
```bash
vman() {
vim -c "SuperMan $*"
if [ "$?" != "0" ]; then
echo "No manual entry for $*"
fi
}
```
Close and reopen your terminal and you're set!
## Usage
This predominantly a command line tool. To open the man page for `vim`:
```bash
$ vman vim
```
![vman vim](http://blog.zimmerman.io/images/vim.1.png)
It's that simple. The underlying `:Man` command supports specifying a specific
section, so you could also do something like
```bash
$ vman 3 printf
```
To see the man page for the C `printf()` library call.
![vman 3 printf](http://blog.zimmerman.io/images/printf.3.png)
## FAQ
For more information, see the [associated blog post][blog].
### Jake, why not just call 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][sdark] for the color scheme and [Vim Airline][vairline] for the
statusbar. If you're curious about my whole setup, be sure to check out my
[dotfiles repository][dotfiles].
## License
MIT License. See LICENSE.
[blog]: http://blog.zimmerman.io/2014/12/20/vim-as-a-man-page-viewer/
[sdark]: https://github.com/altercation/vim-colors-solarized
[vairline]: https://github.com/bling/vim-airline
[dotfiles]: https://github.com/Z1MM32M4N/dotfiles