[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge



Hi,

        Here is my solution for using vim + script as a pager; similar
 mechanisms can be used to use plain vim as PAGER as well.

,----
| #!/bin/bash
| # Shell script to start Vim with less.vim.
| # Read stdin if no arguments were given.
| 
| #VRUNTIME=/usr/share/vim/vim64/
| VRUNTIME=$HOME/etc/vim/
| if test $# = 0; then
|   vim -c "so $VRUNTIME/macros/less.vim" -
| else
|   vim -c "so $VRUNTIME/macros/less.vim" "$@"
| fi
`----

        I take no credit for the vim script or the idea, but it seems
 to work pretty well. Note how the vim invocation changes based on
 whether the PAGER is being used as a filter or not.

        manoj
-- 
"When in doubt, use brute force." Ken Thompson
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: