On 10/01/2012 11:45 p.m., Gary Johnson wrote:
> On 2012-01-10, Cesar Romani wrote:
>> On 10/01/2012 09:06 p.m., Ben Fritz wrote:
>>>
>>>
>>> On Jan 10, 4:50 pm, Cesar Romani<[email protected]> wrote:
>>>> I'm using vim 7.3.401 on windows 7. I'm trying to edit a list of text
>>>> files, say test1.txt, test2.txt and test3.txt, with a single vim. When
>>>> I'm on test1.txt and do: set tw=72, this isn't set on the other files!
>>>> If I do :n to go to the next file and do set tw? I get 78.
>>>>
>>>> Not long ago, before updating to 7.3.401, I used to edit a bunch of
>>>> files, set tw=72 in one of them, and this was globally set on the
other
>>>> files. What happened?
>>>>
>>>> If I set sw=8 in one of them, it will be set on the other files,
but not
>>>> with tw.
>>>>
>>>
>>> I cannot reproduce this, either with:
>>>
>>> gvim -N -u NONE -i NONE test1.txt test2.txt test3.txt
>>>
>>> nor with (to load with just the vimrc_example.vim script and the
>>> official runtime with none of my customizations):
>>>
>>> gvim -N -u "C:\Program Files (x86)\vim\vim73\vimrc_example.vim" --
>>> noplugin -i NONE --cmd "set runtimepath-=U:\vimfiles runtimepath-=U:
>>> \vimfiles/after" test1.txt test2.txt test3.txt
>>>
>>> When I do it, I get textwidth=72 in every buffer.
>>>
>>> However, I do note this line in the vimrc_example.vim:
>>>
>>> autocmd FileType text setlocal textwidth=78
>>>
>>> By default, Vim does not (last I checked) automatically set the
>>> filetype to "text" for anything, so I'm not sure why this is even in
>>> here. But you have a couple of options until/unless it is removed:
>>>
>>> 1. stop sourcing vimrc_example.vim, and just copy the stuff you want
>>> into your own .vimrc
>>> 2. remove the autocmd after sourcing vimrc_example.vim, with "au!
>>> vimrcEx FileType"
>>> 3. define your own textwidth for text files, in a later autocmd
>>>
>>> Sadly with the autocmd method instead of a filetype plugin method, I
>>> don't think you can just use the after directory to override it.
>>
>> If I use vim 7.3.333 I don't have that problem, and the
>> vimrc_example.vim is the same.
>> If I edit a list of text files with vim 7.3.333 and set tw? on one file
>> I get tw=0, but with vim 7.3.401 I get tw=78
>> If I set tw to 72 with 7.3.333 and do :n and set tw? I get tw=72, but
>> with vim 7.3.401 I get always tw=78
>
> This changeset
>
> changeset: 3237:91e53bcb7946
> user: Bram Moolenaar<[email protected]>
> date: Fri Dec 30 13:11:27 2011 +0100
> summary: Updated runtime files.
>
> made just before version 7.3.388 added
>
> au BufNewFile,BufRead *.txt,*.text setf text
>
> to $VIMRUNTIME/filetype.vim.
>
> I haven't tried this, but according to ":help filetype-ignore" you
> can work around this problem by putting this is your .vimrc:
>
> let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\|txt\)$'
>
> That is the default value of g:ft_ignore_pat with "txt" added. That
> will prevent .txt files from being given any file type, which may
> not be the best solution, but it should given you the behavior you
> had using 7.3.333.
It doesn't work, but if I delete the line:
au BufNewFile,BufRead *.txt,*.text setf text
from $VIMRUNTIME/filetype.vim, it works but it isn't a nice solution.
Regards,
--
Cesar
--
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