mirror of
https://git.freebsd.org/ports.git
synced 2025-04-30 02:26:38 -04:00
Two changes here (along with bumping to the latest upstream patch): 1) In the previous Vim commit, support for the system-wide vimrc/gvimrc was dropped because we went through contortions to fix loading order and monkey around with various defaults. However, many people used that file for their system. This commit re-adds support for loading it. All work for untangling the mess of loading defaults.vim and preventing circular loads is left to the user. We just support loading that file; what you do with it is your call. 2) vim-tiny is supposed to be the smallest possible Vim experience, being just the binary and no runtime library. However, without a viable defaults.vim, it's essentially just a larger, slower Vi. The vim-tiny package now ships with defaults.vim, which is patched to prevent errors from Vim loading the syntax library (which is not installed).
21 lines
591 B
C
21 lines
591 B
C
This allows /usr/local/etc/vim/vimrc to be loaded as a system
|
|
vimrc. Note that creating that file will prevent loading
|
|
defaults.vim from Vim's runtime.
|
|
|
|
--- src/feature.h.orig 2022-09-04 15:48:55 UTC
|
|
+++ src/feature.h
|
|
@@ -710,12 +710,12 @@
|
|
/*
|
|
* SYS_VIMRC_FILE Name of the system-wide .vimrc file.
|
|
*/
|
|
-// #define SYS_VIMRC_FILE "/etc/vimrc"
|
|
+#define SYS_VIMRC_FILE "%%ETCDIR%%/vimrc"
|
|
|
|
/*
|
|
* SYS_GVIMRC_FILE Name of the system-wide .gvimrc file.
|
|
*/
|
|
-// #define SYS_GVIMRC_FILE "/etc/gvimrc"
|
|
+#define SYS_GVIMRC_FILE "%%ETCDIR%%/gvimrc"
|
|
|
|
/*
|
|
* DFLT_HELPFILE Name of the help file.
|