Thursday, January 28, 2010

Re: Issues with using Vim as Pager

Ajay Jain 写道:
> Hi,
>
> I am using vim to read man pages. My set up is that I use an ssh
> client (putty) over Windows to login to a Linux server. I use
>
> 1) 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>' -\""
> in my .bashrc
>
> 2) let $PAGER=''
> in my .vimrc
>
> However, the man pages are not displayed properly. For instance, a man
> ls shows distorted characters like:
>
> info coreutils âls invocationâ
>
> Please guide me. I want to be able to use vim as pager and be able to
> read all characters on the man page absolutely fine.
>
> Thanks,
> Ajay.
>

vim can act as pager with the predefined script, usually it is reside in
macros.

please see /usr/local/share/vim/vim72/macros/less.sh if you compiled vim
from source, or some similar directory in /usr/share/vim if you install
vim from distribution's package manager.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: