Provides a way to finally set the option, avoid overwritten it by other plugin
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
It is difficult to make config effect when some option overwritten by other plugin or some autocmd
Describe the solution you'd like
final set shiftwidth=4 or set$ shiftwidth=4
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Well, I know why the feature is needed.
Users don't want to be overwritten options values by plugins.
But it breaks existing plugins.
If plugins want to change the value?
Errors? or it is ignored?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
warning once? probably this shouldn't be provided
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
another option to control its behavior?set opt_final_overwite='error|ignore'
it may not make sense
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
sorry, in my case is some options value in my after/ftplugin user config, overwritten by plugin's autocmd
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
It can be done without this feature, but it's easier with this
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
another case is i want to change the value of formatoptions but it was set in many default ftplugin files
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
another case is i want to change the value of formatoptions but it was set in many default ftplugin files
I use this autocmd to override what other ftplugins do:
au Filetype * setl formatoptions-=cro
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Thanks, that's what I did too, but I think it's more direct
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I will turn it off if not necessary
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think this is more about ftplugin authors to not set options more than necessary.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #11255 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
--
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issue/11255/issue_event/7500368098%40github.com.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Moreover, this autocmd must be the last thing done in _vimrc,
It doesn't need to be the last thing, but it needs to be installed after enabling the filetype plugins:
filetype plugin indent on
Which is why the latter command should be near the top of the vimrc.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
The proposal in Issue #11255, or something similar, would have provided a far simpler solution.
Seems to me the solution should be to write better plugins and have Vim default ones have sensible ways to configure whether these options get set or not. A new feature to completely lock a setting is going to introduce a lot of knock-on effects in my opinion and it doesn't seem clear from the proposal what a failure to set an option leads to. It would at least require a new builtin function for plugin to query whether an option is settable or not so the plugin could branch off to do something else instead. There are also some options where a plugin absolutely has to set or it just won't work at all, and now all plugin authors have to think about the dozens of options they set and go through each of them to check whether they are settable or not.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
My initial thought was as an escape mechanism when user-set options didn't take effect and it was difficult to track where they were overridden. Give control to the user
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
I think the feature is a way(choose) conflict is handled rather than caused by, the conflict was handled by overwriting silent before and this is freezing.
When a plugin option conflicts with a user option, failing because the option is frozen by user is the same for the plugin as failing because the option is overwritten by user. I agree that no conflict is better.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
What I understand is that a plugin should be a good helper, but the control is yours
For example, renovation workers can renovate any room, but you can lock the rooms you don't want to renovate.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
I believe you can also use an OptionSet autocommand, to enforce your personal options settings
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
One can also do what I do, and disable the loading of ftplugins generally. I hate them with the fire of a thousand suns. For a few filetypes that I use frequently, I make my own custom settings, usually just to set &cms
or &com
or make a buffer-local command. It's much easier to disable ftplugins generally than to have to clutter my ~/.vim with an after
dir tree.
As far as I can tell, disabling ftplugins just involves not having ":filetype on
" in ~/.vimrc
.
Note that I'm not suggesting disabling filetype detection; that would suck.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.