Saturday, March 21, 2015

Re: What sets textwidth=78

On Wednesday, March 18, 2015 at 12:18:52 PM UTC-7, Gary Johnson wrote:
> On 2015-03-18, porphyry5 wrote:
> > On Monday, March 16, 2015 at 12:40:50 PM UTC-7, riesebie wrote:
> > > * Graham Lawrence [2015-03-16 11:06 -0700]:
> > >
> > > > Using Huge vim 7.4 with patch 1-473 on arch linux
> > > >
> > > > One of the last entries in my .vimrc is
> > > > set textwidth=0
> > > > which is occasionally overridden by some feature in vim that arbitrarily
> > > > sets the textwidth to 78.
> > > >
> > > > Most of the time this creates no problem, but when I happen to add text to
> > > > a .vimrc mapping that exceeds 78 characters, arbitrary line breaks are
> > > > introduced into it, which matters a great deal.
> > > >
> > > > Does anyone know what might do this?
> > >
> > > :help textwidth. grep your vimrc for tw.
> > >
> > > Elimar
> > > --
> > > We all know Linux is great... it does infinite loops in 5 seconds.
> > > -Linus Torvalds
> >
> > My .vimrc only has my setting of textwidth to 0, but as you
> > mentioned vimrc I have also set /etc/vimrc to tw=0 as well. We
> > shall see what happens, unfortunately this change to my tw setting
> > is a random (and relatively infrequent) event. Time will tell, I
> > guess.
> >
> > However, I do not expect it to solve the problem, as my .vimrc
> > will follow /etc/vimrc, and the real problem is that some part of
> > vim arbitrarily changes this setting. Most of the time I can
> > change and create long lines without incident, because tw is 0.
> > But sometimes it is 78.
>
> When it is 78, execute
>
> :verbose set tw?
>
> That will show you where it was set to 78. I know you wrote in
> another message that it did not show you where 'tw' was set, but I
> suspect that you did not do that when 'tw' was 78.
>
> Regards,
> Gary

Thank you, by a happy coincidence it has occurred again, and
:verbose set tw?
reveals the culprit to be /usr/share/vim/vim74/ftplugin/vim.vim
maintained by one Bram Moolenaar
rather incontrovertibly proving my claim that this thing was set by vim itself.

Thank you again, its easy to fix.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: