Wednesday, March 25, 2015

Re: What sets textwidth=78

On Wed, 25 Mar 2015 04:19:41 -0500 toothpik <toothpik6@gmail.com> wrote:

> On Wed, Mar 25, 2015 at 11:00:08AM +0200, Gevisz wrote:
> > On Mon, 23 Mar 2015 21:43:04 +0100 Christian Brabandt <cblists@256bit.org> wrote:
>
> > > On Mo, 23 Mär 2015, Gevisz wrote:
> > >
> > > > I also quite irritated by this persistent change from tw=0 to tw=78 sometimes.
> > >
> > > Create an autocommand:
> > >
> > > au FileType vim :set tw=0
> > >
> > > Alternatively, use a after ftplugin like this:
> > > http://vimhelp.appspot.com/vim_faq.txt.html#faq-26.6
> > >
> > > Best,
> > > Christian
>
> > Thank you, Chistian. Your tips are always useful.
>
> > But so far, I have already found the place where tw was set to 78 in my case (and deleted it :).
>
> > Hopefully, it will be enough to get rid of this situation in the future.
>
> > If not, I will try your suggestion.
>
> the next update to the vim.vim in the runtime ftplugin folder will wipe
> out any changes you make to that module, which is why we are
> recommending creating an after directory to hold your override -- it is
> bad practice to change anything in the runtime directory

Thank you for explanation, I will take it into account,
but in my case I was disturbed by setting tw=78 that happened
not in vim.vim but in my local .vimrc (in the part of it that
remained from the original .vimrc that has been installed
by default, sorry to accept it). Somehow and sometimes it
overided the settings I set in a ~/.vim/ftplugin/myfiletype.vim

I have found out it due to the
:verbose set tw
tip from this thread.

P.S. Just now had a look into my ~/.vimrc again.
Now the corresponding line looks like
autocmd FileType text setlocal textwidth=0
It is very similar to that was proposed by Christian.

> no update from Bram will ever touch anything in your
> ~/.vim/after/ftplugin directory


--
--
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:

Post a Comment