This is very nice, but in to make it work I had to set GROFF_NO_SGR=yes in my environment. Because, by default grotty (groff driver for typewriters-like devices) emits SGR escape sequences (from ISO 6429, also called ANSI color escapes) to change text attributes (bold, italic, colors). These escape sequences are not processed by col and not displayed as such by view. I thought it could be handled by some vim macro, and the answer is perhaps negative. Then, the solution should be inhibiting grotty from emitting these escape sequences, by setting the env variable mentined above. Other then this, I think that view with the man syntax should remove the backspaces itself, and there is n oneed for col and iconv. But, it seens man.vim doesn't work correctly. It emboldens and undelines, but does not remove the backspace.
Kamaraju Kusumanchi wrote, On 29/12/06 20:20: > On Friday 29 December 2006 07:05, J.A. de Vries wrote: > > >> 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 >> > > Wow! What a beauty! > > raju > > -- Dr. Zvi Har'El mailto:[EMAIL PROTECTED] Department of Mathematics tel:+972-54-4227607 icq:179294841 Technion - Israel Institute of Technology fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL "If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)