Git Product home page Git Product logo

vim-superman's Introduction

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 statusbar. If you're curious about my whole setup, be sure to check out my dotfiles repository.

License

MIT License. See LICENSE.

vim-superman's People

Contributors

camflint avatar casey avatar coldeasy avatar henrebotha avatar irfansharif avatar jez avatar timfeirg avatar zeroknight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vim-superman's Issues

Follow `man` behaviour

This is great, thanks!

Could the null man behaviour be emulated?

$ ~/.local/share/vim/bundle/vim-superman/bin/vman
No manual entry for
$ man
What manual page do you want?

Read man page in split mode

Hi,
I find superman really great, especially when doing c programming and needing to read man pages.
I use the plugin from inside vim with for example

:SuperMan printf

I would like to open the man page in a split. Currently it creates a new buffer, and loads in a complete windows.

Can anyone check if vman and man always work.

I have fish shell. I translated the vman function to fish-speak. The function works nicely, for example,
vman ls works.

I noticed that vman help returns "No manual entry for help" but man help works.

Can anyone else confirm this on bash ?

It'll be great if we can be sure that there is no man page for a command when vman says so. Otherwise, we'll have to check man every time.

Release tag

Hi Jake,

I'm using vman for quite a while now and would like to have a release tag to have a better checkout mechanism for updating the plugin.

Bests from Berlin

Don't use $EDITOR, use $VISUAL

VISUAL vs EDITOR what's the difference?

The EDITOR editor should be able to work without use of "advanced" terminal functionality (like old ed or ex mode of vi). It was used on teletype terminals.

A VISUAL editor could be a full screen editor as vi or emacs.

Please change to:

${VISUAL:-vim} -c "SuperMan $*"

Visual is where vi got its name from after all! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.