On 2025-02-28, David Mandelberg (Vim Github Repository) wrote:
> That does the opposite of what I want. That would make my preference for
> 80-by-default override the filetype plugins, but I want the filetype plugins 
> to
> override my preference.

Yes.  Sorry.  If you want to respect a filetype plugin's setting of
'textwidth' to any value, including 0, it gets trickier.

In fact, I thought I had a solution with a combination of
BufNewFile, OptionSet and BufWinEnter autocommands, but I can't get
an OptionSet autocommand to respond when the mail.vim ftplugin sets
'textwidth'.  I know that autocommands are inhibited during startup,
but the OptionSet autocommand seems to be inhibited during ftplugin
loading as well.

Upon the BufWinEnter event, you could parse the output of ":verbose
set tw?" to see if any plugin set it, but that's more work than
I have time for at the moment.

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.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/20250228223031.GH10587%40phoenix.

Raspunde prin e-mail lui