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.

> So 'fo' is the right way to set this.
> 
> Is the "O:" option in 'comments' meant to do the same thing?  It still seems
> like a bug that it only changes behaviour when opening a line above, NOT 
> below.

Yes.  The O: option is mentioned in version5.txt.  It does seem odd
that it affects O and not o

> Also, in a /* ... * ... */ style comment, when opening a line in the middle, 
> we
> know they're still definitely inside the comment, so in that case I'd prefer 
> it
> DID keep the comment leader.  But I don't suppose there's an option for that?

Not that I know of.  I suppose you could create mappings for the
o and O commands that would add a leading * if one was detected in
the line above or below.

Regards,
Gary

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