On 2006-12-28 @ 22:39:18 (week 52) Zvi Har'El wrote:
> Dear Vim Gurus,
>
>
> I am using Linux in a UTF-8 locale, and I have a problem with using
> less as a pager for manual pages: I cannot search for options, since
> they use a dash instead of a minus sign, and I don't have an easy way
> to type the hyphen (I have put some xterm definitions for various
> dashes in .Xdefaults, using ctrl-minus, alt-minus, etc, but I always
> forget which is which :'( ). I thought I could use vim's less.sh as a
> replacement for less, but it has a problem with the vt100 escape
> sequences which are used in the man page for emboldening and
> underlining. Is there a vim macro file which can be used instead of
> less.vim, or in addition to it, which can handle escape sequences, and
> not show the raw data?
I have this in my bashrc:
# Use vim as a manpage reader
function vman {
/usr/bin/man $* | /usr/bin/col -bp | /usr/bin/iconv -c | /usr/bin/view -c
'set ft=man nomod nolist' -
}
Someone suggested it years ago (don't remember who) and it works great
for me.
Grx HdV