Hi, On Sun, 01 Dec 2024, Tony Mechelynck wrote:
> At the moment, there are several sets of "default" option settings in Vim : > - "compatible" defaults (or "vi defaults") used when the -C switch > is used on the command-line or when you have no vimrc but an exrc > - - These are there to mimic the behaviour of legacy Vi (with the > exception of what Bram regarded as "bugs" in the POSIX description of > Vim). Therefore IMHO they MUST NOT be changed ; > - "POSIX" defaults, used in addition to the "vi defaults" when > $VIM_POSIX is set. These try to make Vim even more like legacy Vi than > just setting 'compatible', even to the point of imitating its > POSIX-entrenched "bugs". For the same reason as above, IMHO they MUST > NOT be changed ; > - "nocompatible" defaults. They are used, for example, if you have > an empty vimrc, or if you put -N -u NONE on the command-line ; > - "defaults.vim" settings. These are set by $VIMRUNTIME/defaults.vim > when no vimrc is found. > - - They are also set if you source either defaults.vim or > vimrc_example.vim somewhere near the beginning of your vimrc, or if > you have -u DEFAULTS on the command-line even if you have a vimrc > (which in that case won't be sourced). > > I see several threads proposing to make this or that "defaults.vim" > setting the Vim default for everybody. IMHO this is unwise, because it > is not backward-compatible. If you want those settings even though you > have a vimrc, source the defaults.vim or the vimrc_example.vim from > it. If there are _other_ settings set by the defaults.vim which you > _don't_ want, well, reverse them when Vim comes back to your vimrc > after sourcing them. This is the time-honored backward-compatible way > to do it and if you do it this way instead of changing everyone's > defaults, no one will be surprised. > > For instance the defaults.vim contains a line which says > filetype plugin indent on > My preferences go to filetype detection on, filetype plugins on, > filetype indent off. No problem : after sourcing > $VIMRUNTIME/vimrc_example.vim (which calls the defaults.vim nowadays) > my vimrc has a line > filetype indent off > and voilĂ . As far as what I am concerned, I don't plan to make changes to the defaults, except for gradually moving (non-controversial) defaults from defaults.vim to the C code, because this seemed to be what Bram wanted to achieve. But it still causes a bit of discussion. Independently of this, there has been a bit of discussion on whether or not we should handle defaults.vim a bit more consistently, such that there is no inconsistency between: - users not having a configuration file at all - users creating a simple (empty) vimrc file (where suddenly Vim would behave slightly differently) This has been a major source of discussion/confusion/hate for people in the past. I don't know how to improve this situation yet. Thanks, Christian -- Here I am in the POSTERIOR OLFACTORY LOBULE but I don't see CARL SAGAN anywhere!! -- -- 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/Z03d/1W/X1CVejeh%40256bit.org.