On 27/10/08 18:47, Ian Young wrote:
> On Sun, Oct 19, 2008 at 6:14 PM, Peter Hodge<[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> What is the value of formatoptions in each of those filetypes?
>>
>> :setlocal fo?
>>
>> Specifically, you'll need to have at the letter 'r' in the value. (:help
>> fo-table for more info)
>>
>> regards,
>> Peter
>>
>
> Good call! That was indeed the problem. PHP files have fo=qrowcb,
> while the others had fo=tcq (the default). I poked around and
> couldn't figure out the "correct" way of fixing this, but for the
> moment putting the following lines in my ~/.vimrc seems to have done
> the trick:
>
> au BufRead,BufNewFile *.html setlocal fo=qrowcb
> au BufRead,BufNewFile *.inc setlocal fo=qrowcb
>
> Thanks again,
> Ian
Well, you could create a ~/.vim/after/ftplugin/html.vim (on Unix) or
~/vimfiles/after/ftplugin/html.vim (on Windows), and similarly for
whatever filetype the *.inc files are detected as having, with the
single line:
setlocal fo+=r
Create the directories if they don't yet exist. You can do this from
within Vim, using for instance, on Unix:
:!mkdir -pv ~/.vim/after/ftplugin
or, on Windows, this can give errors (which can be neglected) if the
directories already exist:
:!md $HOME/vimfiles
:!md $HOME/vimfiles/after
:!md $HOME/vimfiles/after/ftplugin
This has the advantage (on Windows) that it uses whatever Vim sets $HOME
to even if the HOME environment variable is unset outside of Vim.
Best regards,
Tony.
--
You need only reflect that one of the best ways to get yourself a
reputation as a dangerous citizen these days is to go about repeating
the very phrases which our founding fathers used in the struggle for
independence.
-- Charles A. Beard
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---