You are not logged in.

#1 2005-11-22 14:41:13

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

How to use Vim as your manpager :)

For all those vim users out there who wish to have man pages open with vim by default, you just need to add the following line to your .bashrc or .bash_profile:

export MANPAGER="col -b | view -c 'set ft=man nomod nolist' -" 

If you want your .vimrc to be read as well, just add the following before the `-c' in the above:

-u location of rc file

BTW, if anyone knows how to disable line numbers when using the above with a .vimrc containing set number , please let me know    wink


.oO Komodo Dave Oo.

Offline

#2 2005-11-22 17:40:17

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: How to use Vim as your manpager :)

try:

export MANPAGER="col -b | vim -c 'set ft=man nonu nomod nolist' -"

the nonu should take care of removing line numbers

Offline

#3 2005-11-22 17:45:26

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: How to use Vim as your manpager :)

phrakture wrote:

try:

export MANPAGER="col -b | vim -c 'set ft=man nonu nomod nolist' -"

the nonu should take care of removing line numbers

It's official - phrakture is THE vim guru  big_smile


.oO Komodo Dave Oo.

Offline

#4 2005-11-22 17:52:16

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: How to use Vim as your manpager :)

phrakture is the everything guru.  X11, CLI, VIM, ssh, network, lovemaking, organized crime, kernel hacking, etc.

everything except Java, that is.

Dusty

Offline

#5 2005-11-22 18:30:14

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: How to use Vim as your manpager :)

Dusty wrote:

phrakture is the everything guru.  X11, CLI, VIM, ssh, network, lovemaking, organized crime, kernel hacking, etc.

everything except Java, that is.

ROFL

I was forgetting   big_smile


.oO Komodo Dave Oo.

Offline

#6 2005-11-22 20:14:55

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: How to use Vim as your manpager :)

Dusty wrote:

... lovemaking ...

Am I the only one wondering how you know this fact? wink

Offline

#7 2005-11-22 20:38:45

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: How to use Vim as your manpager :)

Dusty wrote:

phrakture is the everything guru.  X11, CLI, VIM, ssh, network, lovemaking, organized crime, kernel hacking, etc.

arooaroo wrote:

Am I the only one wondering how you know this fact?

You weren't supposed to tell, schnookums!

Offline

#8 2005-11-22 20:51:31

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: How to use Vim as your manpager :)

phrakture wrote:
Dusty wrote:

phrakture is the everything guru.  X11, CLI, VIM, ssh, network, lovemaking, organized crime, kernel hacking, etc.

arooaroo wrote:

Am I the only one wondering how you know this fact?

You weren't supposed to tell, schnookums!

AHAHAHAHAHA, that has TOTALLY made my day   lol


.oO Komodo Dave Oo.

Offline

#9 2005-11-22 22:02:12

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: How to use Vim as your manpager :)

For the record, there is also "manpageview.vim", on www.vim.org.  However, for me it doesn't seem to properly remove the ^H characters from the page before displaying it.
I've been meaning to delve into it.

With manpager set like this, you cannot use "K" from within vim, thought you can with manpageview.

Offline

#10 2005-11-22 22:23:28

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: How to use Vim as your manpager :)

amazing trick, i like that very much, thanks! smile

Offline

Board footer

Powered by FluxBB