On Fri, 15 Mar 2019 at 02:44, Gary Johnson <garyj...@spocom.com> wrote:

> On 2019-03-14, Robert Webb wrote:
> > Ah, thanks Gary,
> >
> > Actually I already set 'fo' in my vimrc, but I set it with "autocmd
> BufRead".
> > I suppose the file-type commands happen after that?
>
> Yes.  The BufRead and BufNewFile events trigger the FileType event
> through the autocommands in $VIMRUNTIME/filetype.vim and the
> FileType event triggers the sourcing of the filetype plugin(s) via
> $VIMRUNTIME/ftplugin.vim.  So, it's also important that the FileType
> autocommand in your vimrc follow the ":filetype on" (or equivalent)
> command so that your FileType autocommand command is executed after
> filetype plugins are sourced.
>

Actually I have no idea what happened, but it's not working again.  My 'fo'
is being set to 2croql again for C++ files, even though I am overriding it
in my _vimrc.

It works if I use "autocmd FileType * set fo=2crq"
But NOT if I use "autocmd FileType *.h set fo=2crq"

Same if I use setlocal, or both set and setlocal.

Why would it work for all files with "*" but not just for header files with
"*.h"?

Thanks,
Rob.

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui