FreeBSD Bugzilla – Attachment 235824 Details for
Bug 251420
editors/vim /usr/local/share/vim/vim82/defaults.vim overrides /usr/local/etc/vim/vimrc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Only source defaults.vim if none of the documented startup files exist
freebsd_vimrc_default.diff (text/plain), 830 bytes, created by
Tim Chase
on 2022-08-10 15:30:10 UTC
(
hide
)
Description:
Only source defaults.vim if none of the documented startup files exist
Filename:
MIME Type:
Creator:
Tim Chase
Created:
2022-08-10 15:30:10 UTC
Size:
830 bytes
patch
obsolete
>--- vimrc.current 2022-07-05 10:41:17.000000000 -0500 >+++ vimrc 2022-08-10 10:25:19.459642000 -0500 >@@ -1,7 +1,17 @@ > " defaults.vim will override this file. Sourcing it here and > " setting the skip flag prevents clobbering settings >-source $VIMRUNTIME/defaults.vim >-let skip_defaults_vim = 1 >+" However, according to ":help VIMINIT", defaults.vim should only >+" get sourced by default if none of the startup files are present >+for s:location in ['~/.vimrc', '~/.vim/vimrc', '~/_vimrc', '~/.exrc', '~/_exrc', $VIMINIT, $EXINIT] >+ if strlen(s:location) > 0 && filereadable(expand(s:location)) >+ let skip_defaults_vim = 1 >+ endif >+endfor >+ >+if !exists('skip_defaults_vim') >+ source $VIMRUNTIME/defaults.vim >+ let skip_defaults_vim = 1 >+endif > > set nocompatible " Enable Vim mode (instead of vi emulation) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251420
:
220026
| 235824