Why change formatoptions
in ftplugin files?
#13827
Replies: 4 comments 12 replies
-
Some |
Beta Was this translation helpful? Give feedback.
-
P.S. If that same French user has a few text files where he wants to disable that French-style indenting, he can do it by means of a modeline (q.v.) in those particular files. |
Beta Was this translation helpful? Give feedback.
-
FWIW, these settings are not all the same for all filetypes. I checked a few files currently loaded in my "Rolodex Vim" instance of gvim, and I found the following:
Bram was well known for his staunch insistence on backward compatibility, and I can't blame him for that. If these filetype-dependent defaults suddenly changed, no doubt many users who depended on them would raise the hue and cry on these very mailing lists. My advice is to keep them as-is, and let any user who wants some other setting add a |
Beta Was this translation helpful? Give feedback.
-
FWIW, I found this annoying enough back in my first few years of vimming to force |
Beta Was this translation helpful? Give feedback.
-
Some filetype plugin files change
formatoptions
, and I can see, based on #4680, that this is done on purpose and has been discussed before. My question is what is the advantage of settingformatoptions
on a filetype level? I can see how it might be helpful to remove known problematic options for some languages, but I don't see how it helps to add multiple options?I understand that this will likely not change, and this is not really a request for any changes (though I would support not changing
formatoptions
inftplugin
s), but I would like to know what the advantage is here? Am I missing something, and do some languages have clear advantages with certainformatoptions
settings?Beta Was this translation helpful? Give feedback.
All reactions