Re: if.. exitsts query
- On Tue, 29 Mar 2005 at 6:28pm, Bruce Golling wrote:
> Hello,I have this in my vimrc which I hope you also find useful:
> I am trying to set up a condition in my gvimrc.
> I wanted do something similar to
> psuedo-code follows:
> " if wordwrap is on
> then turn off the bottom slider
> else turn on the bottom slider"
> I can't seem to figure out the correct syntax for the
> "if exists ('wrap')"
> If anyone can even understand what I'm trying to say,
> I hope you can lend me a hand.
> Bruce Golling
if (! &wrap && has('GUI'))
au WinEnter * :call <SID>CheckBottomScrollBar()
au BufWinEnter * :call <SID>CheckBottomScrollBar()
This turns on/off the scrollbar based on the 'wrap' setting in the
current window. This creates a bit of a flash or a noticeable redraw,
but nothing terrible.
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!