Halim, Salman <salman@...
> I'm not sure I see the need for CursorHold in there, unless you use
> :match elsewhere in your work, too. (I don't, so have a simple
> The only thing I have been able to do effectively is to do something
> execute 'set lines=9999 columns=' . (&tw + (&nu ? 8 : 0) + 2)
Beware: some files set &tw to 0 (meaning no fixed text width) by means of
modelines or maybe filetype-plugins. I suggest replacing &tw above by
something like (&tw < 60 ? 60 : &tw) to avoid making the vim window
> Sets the lines to the maximum that'll fit on-screen and the columns
> to 'textwidth' + 8 if line-number is on + 2 for signs (I use
> ShowMarks). Combine this with a command that changes your textwidth
> and start using that instead of 'set tw=' and it'll always keep the
> window size to precisely what your line length should be. . .
> > -----Original Message-----