Showing posts with label man. Show all posts
Showing posts with label man. Show all posts

Wednesday, February 13, 2008

New Man

I read a lot of manpages, and I like to have power and flexibility when doing so. Luckily, Vim is up to the task:

My primary Desktop is a modern Linux distro, so it uses utf-8 as the locale. I added the following to my bashrc (actually zshrc, but this should work for bash as well).

function man
{
/usr/bin/man $* | col -bp | iconv -c | view -c 'set ft=man nomod nolist' -
}

If you're on an older system that doesn't use utf-8 try something like this instead:

function man
{
/usr/bin/man $* | col -b | view -c 'set ft=man nomod nolist' -
}

Note that the above functions may need to modified for your shell.

Thursday, December 6, 2007

Hey Man

Want to see the man page for whatever command is under the cursor? Hit K in normal mode, and Vim will open the man page the same as your favorite shell.