Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

color man pages

16 views
Skip to first unread message

Scott Eberl

unread,
Jun 7, 2004, 5:34:09 PM6/7/04
to
I notice that man pages use bold text for headers and the such, is it
possible to get syntax highlighting on man pages to make them easier to
pick out the headings and stuff?
Message has been deleted

/dev/rob0

unread,
Jun 7, 2004, 7:02:04 PM6/7/04
to

I don't know if this is what you want, but I use mc as my man pager,
like this:
#v+
$ which Man
/usr/local/bin/Man
$ cat `which Man`
/usr/bin/mc -cv `/usr/bin/man -w $@`
#v-
It's a simple little thing that gets an error if the requested page
can't be found, but it's good enough for me.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply

SuperDaemon

unread,
Jun 7, 2004, 8:29:03 PM6/7/04
to
Scott Eberl wrote:

You may want to try "most" as your pager. "man -P /usr/bin/most man" to see;
and set your color preferences in $HOME/.mostrc

Steve Youngs

unread,
Jun 7, 2004, 8:37:36 PM6/7/04
to

Live inside XEmacs. Not only will you get the highlighting you want,
but you'll also be able to click on a crossreference and have that man
page open for you.

--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|----------------------------------<st...@youngs.au.com>---|

Jason Wade

unread,
Jun 8, 2004, 12:34:02 AM6/8/04
to
On Mon, 07 Jun 2004 18:02:04 -0500, /dev/rob0 wrote:

> /usr/bin/mc -cv `/usr/bin/man -w $@`

a keeper
thanks /dev/rob0

--
Warning to 'bots: Do not send spam to
savon1414.can...@earthlink.net

Mark Hill

unread,
Jun 8, 2004, 6:31:23 AM6/8/04
to
On Mon, 07 Jun 2004 21:34:09 -0000,
Scott Eberl <sc...@airea420.com> wrote:
> is it possible to get syntax highlighting on man pages

There are several ways to set up vim as a man pager. These links give
some ideas:

<http://vim.sourceforge.net/tips/tip.php?tip_id=167>
<http://vim.sourceforge.net/tips/tip.php?tip_id=121>

--
Mark Hill <use...@mark.ukfsn.org>
GPG KeyID: 4A3B58AC

Otako

unread,
Jun 8, 2004, 10:44:00 AM6/8/04
to

put the following in your ~/.Xdefaults file. this will provide yellow
and cyan highlighting of bold text and underlines in xterm and aterm
with black/green bg/fg.

! signs are for comments.

if you want it to be system wide (global for all users) then edit
the /etc/X11/app-defaults/XTerm-color file.

---- cut -----


! xterm/aterm colours.

*VT100*Background: black
*VT100*Foreground: green


! Enable Colour by default.

*VT100*colorMode: on
*VT100*boldColors: on
*VT100*dynamicColors: on

! the following for man page bold/underline.

! Uncomment this to use color for underline attribute
*VT100*colorULMode: on
!*VT100*underLine: off

! Uncomment this to use color for the bold attribute
*VT100*colorBDMode: on

! Uncomment this to use the bold/underline colors in preference to other colors
*VT100*colorAttrMode: on

! colours defined here
*VT100*color0: black
*VT100*color1: red3
*VT100*color2: green3
*VT100*color3: brown4
*VT100*color4: blue3
*VT100*color5: magenta3
*VT100*color6: cyan3
*VT100*color7: gray90
*VT100*color8: gray30
*VT100*color9: red
*VT100*color10: green
*VT100*color11: yellow
*VT100*color12: blue
*VT100*color13: magenta
*VT100*color14: cyan
*VT100*color15: white
*VT100*colorUL: cyan
*VT100*colorBD: yellow


--- cut ----

Otako

unread,
Jun 8, 2004, 11:23:54 AM6/8/04
to
On 2004-06-08, SuperDaemon wrote:
> You may want to try "most" as your pager. "man -P /usr/bin/most man" to see;
> and set your color preferences in $HOME/.mostrc

nice one, an alias such as the following could be used in /etc/profile or
.bashrc.

alias manc='man -P /usr/bin/most $1'


Ross Kendall Axe

unread,
Jun 8, 2004, 1:22:46 PM6/8/04
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Otako wrote:
| On 2004-06-08, SuperDaemon wrote:
|
|>You may want to try "most" as your pager. "man -P /usr/bin/most man"
to see;
|>and set your color preferences in $HOME/.mostrc
|
|
| nice one, an alias such as the following could be used in /etc/profile or

| ..bashrc.


|
| alias manc='man -P /usr/bin/most $1'
|

export PAGER=/usr/bin/most is another option IIRC.


Ross

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAxfXl9bR4xmappRARApUqAKDenXGUY41J9NAAcLDfbctr2aCmDgCeOdxK
2rr8ZpAz7Ajuh2lfc1S9a9E=
=xHqK
-----END PGP SIGNATURE-----

Thomas Overgaard

unread,
Jun 12, 2004, 4:13:20 PM6/12/04
to

dev wrote :

> I don't know if this is what you want, but I use mc as my man pager,
> like this:
> #v+
> $ which Man
> /usr/local/bin/Man
> $ cat `which Man`
> /usr/bin/mc -cv `/usr/bin/man -w $@`
> #v-

Then you could end this with a 'alias man=/usr/local/bin/Man' and have
full Midnight Commander replacement of the usual man pager.
--
Thomas O.

This area is designed to become quite warm during normal operation.

/dev/rob0

unread,
Jun 12, 2004, 6:42:49 PM6/12/04
to
On Sat, 12 Jun 2004 22:13:20 +0200, Thomas Overgaard wrote:
>> $ which Man
>> /usr/local/bin/Man
>> $ cat `which Man`
>> /usr/bin/mc -cv `/usr/bin/man -w $@`
>
> Then you could end this with a 'alias man=/usr/local/bin/Man' and have
> full Midnight Commander replacement of the usual man pager.

I don't do that because sometimes I want a more standard pager. "Man"
does not work with other man commands, such as "man -k keyword". That
is why I used the uppercase M in the first place: to differentiate.

Oh, that reminds me of a funny root oops I did when I was testing this
little scheme. I started out with it as usr/local/bin/man:
mc -cv `man -w $@`
My first attempt to view a man page with that command about crashed my
system. Kids, don't try this at home. Professional stunt driver on a
closed track. :)

Stuart Winter

unread,
Jun 12, 2004, 7:19:38 PM6/12/04
to
On Sat, 12 Jun 2004 17:42:49 -0500, ro...@gmx.co.uk wrote:

> I don't do that because sometimes I want a more standard pager. "Man"
> does not work with other man commands, such as "man -k keyword". That
> is why I used the uppercase M in the first place: to differentiate.

I haven't been folowing this thread, but incase this hasn't
already been mentioned:

installpkg most
export MANPAGER="/usr/bin/most -s"


--
Stuart Winter
www.interlude.org.uk, www.biscuit.org.uk, www.armedslack.org

Alan Hicks

unread,
Jun 13, 2004, 11:28:07 AM6/13/04
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In alt.os.linux.slackware, /dev/rob0 dared to utter,


> Oh, that reminds me of a funny root oops I did when I was testing this
> little scheme. I started out with it as usr/local/bin/man:
> mc -cv `man -w $@`

Heh. I can honestly say I haven't done that one!

Infinite Loop- (n.) see "Loop, Infinite"

Loop, Infinite- (n.) see "Infinite Loop"

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAzHJ1lKR45I6cfKARAuY5AJ42AIH6jJ/7GJkac1bOYlWvXfrc8ACeMBrB
SaypJqha6guRBEX9rrqbJHI=
=e5c+
-----END PGP SIGNATURE-----

0 new messages