Wikia

Vim Tips Wiki

See man pages by gview

Talk0
1,612pages on
this wiki
Revision as of 09:32, April 25, 2008 by JohnBot (Talk | contribs)

Tip 1338 Printable Monobook Previous Next

created September 22, 2006 · complexity basic · author gosman · version n/a


First, source the script man.vim in your vimrc like below, then you can use :Man command.

source /usr/share/vim/vim70/ftplugin/man.vim

Then, create a bash script gman like below:

#!/bin/bash
#gman use gview to see the man pages
#usage: gman name
#example: gman ls
gview -c \"Man $1\" -c only

Now you can see man pages by gman, and you can use scrollbar to browse the manual.

Comments

I am fond of the following bash function which has a similar effect to this tip.

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

Can also do with an alias for the csh shells.


See VimTip167.


Around Wikia's network

Random Wiki