I am using putty (on Windows) to login to a linux machine.
I wish to read the manpages using Vim. I have added the followig to my
.bashrc:
export PAGER="/bin/sh -c \"unset PAGER;col -b -x | view -c 'set ft=man
nomod nolist' -c 'map q :q<CR>' -c 'map <SPACE> <C-D>' -c 'map b <C-U>'
-c 'nmap K :Man <C-R>=expand(\\\"<cword>\\\")<CR><CR>' -\""
However, I am not able to read the manpages correctly. Some characters
are distorted etc etc. Can somebody share his tested settings, so that I
can read these pages in the best possible way.
Thanks and Regards,
Ajay.
It could be what you're looking for.
[...]
> I wish to read the manpages using Vim.
I recommend you read tip 167:
http://vim.wikia.com/wiki/Using_vim_as_a_man-page_viewer_under_Unix
[...]
--
HTH
Thor
Xterm certainly has some capabilities that PuTTY doesn't have, but -
in what way does it have "better" terminal emulation? Ie, how is
xterm with TERM=xterm-256color better than PuTTY with
TERM=putty-256color?
~Matt
Here is what works for me -- just two steps:
1. Put this near the top of your ~/.vimrc on the remote host.
That's two single quotes ('') which means to reset it to empty
so Vim won't try to call itself if you follow links inside of one
man page to another:
let $PAGER=''
2. Add this to your ~/.bashrc on the remote host
(or add to whatever Bourne family shell rc file you use).
Be sure that you don't have PAGER defined anywhere else:
export PAGER="/bin/sh -c \"unset PAGER;col -b -x | \
vim -R -c 'set ft=man nomod nolist' -c 'map q :q<CR>' \
-c 'map <SPACE> <C-D>' -c 'map b <C-U>' \
-c 'nmap K :Man <C-R>=expand(\\\"<cword>\\\")<CR><CR>' -\""
After following this there are some unresolved issues:
For example:
1) gcc [-câ-Sâ-E] [-std=standard]: The distorted character should have been a |.
2) WHEN may be âneverâ: The distorted character should have been '.
Can we deal with them and correct them?
Rgs | Ajay.