Vim Tips Wiki

See man pages by gview

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 1338 Printable Monobook Previous Next

created 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:

#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.


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

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

Or for gview:

function gman() {
  # Don't trigger gview unless there is a page to show.
  for f in `man -w $*`; do
    man $f | col -b | gview -c 'set ft=man nomod nolist' - &> /dev/null

Can also do with an alias for the csh shells:

alias gman 'man \!* | col -b | gview - >&! /dev/null'

See VimTip167.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki