On Mon, Jul 25, 2011 at 11:50:39PM +0300, Elias Toivanen wrote:
> Hello,
>
> I've also experienced man.vim crashing when $MANPAGER had been already
> defined to `col -b | vim -R -' in .bashrc. I took a look at the man.vim
> file and came up with the following idea.
>
> Instead of asking if $MANPAGER was defined, why not define it
> temporarily for the call. It's possible to do this via
>
> let tmp = tempname()
> let $MANWIDTH = &tw ? &tw : 80
> let manpager = shellescape('less -s') " Fixes problems when user has
> defined $MANPAGER
> silent execute "!MANPAGER=".manpager." /usr/bin/man ".args."| col -b
> > ".tmpUsing "!env MANPAGER=...." is better as not all shells support declaring environment variables to use for a command invocation like that. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
signature.asc
Description: Digital signature
