aboutsummaryrefslogtreecommitdiff
path: root/editors/vim/files/patch-runtime_defaults.vim
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vim/files/patch-runtime_defaults.vim')
-rw-r--r--editors/vim/files/patch-runtime_defaults.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/editors/vim/files/patch-runtime_defaults.vim b/editors/vim/files/patch-runtime_defaults.vim
new file mode 100644
index 000000000000..0523e79e1ee2
--- /dev/null
+++ b/editors/vim/files/patch-runtime_defaults.vim
@@ -0,0 +1,24 @@
+We wrap `syntax on` in a try block so that it won't produce errors for
+vim-tiny, which doens't include the runtime library.
+
+We also source our own FreeBSD-specific defaults file.
+
+--- runtime/defaults.vim.orig 2022-09-04 15:43:53 UTC
++++ runtime/defaults.vim
+@@ -130,7 +130,9 @@ endif
+ " GUI (which always has colors).
+ if &t_Co > 2 || has("gui_running")
+ " Revert with ":syntax off".
+- syntax on
++ try
++ syntax on
++ catch | endtry
+
+ " I like highlighting strings inside C comments.
+ " Revert with ":unlet c_comment_strings".
+@@ -152,3 +154,5 @@ if has('langmap') && exists('+langremap')
+ " compatible).
+ set nolangremap
+ endif
++
++source $VIMRUNTIME/defaults_freebsd.vim