aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2022-08-01 13:44:44 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2022-08-01 13:47:55 +0000
commit8380febbf30620bc0833a9eac823b54f4799ad49 (patch)
tree92bce35b9ace4beac244db351bdf7725763b76a2
parent3dead2609865c1d555afbaa3ace90ac02236c649 (diff)
downloadports-8380febbf30620bc0833a9eac823b54f4799ad49.tar.gz
ports-8380febbf30620bc0833a9eac823b54f4799ad49.zip
editors/vim: Add some explanatory comments to the vimrc
Our vimrc duplicates settings from $VIMRUNTIME/defaults.vim, which appears odd. However, it's actually required because of vim-tiny. vim-tiny installs an empty defaults.vim stub, meaning that it only gets the settings that appear in our vimrc. PR: 265502
-rw-r--r--editors/vim/files/vimrc8
1 files changed, 7 insertions, 1 deletions
diff --git a/editors/vim/files/vimrc b/editors/vim/files/vimrc
index 6faf60ca412d..cc200a086c9d 100644
--- a/editors/vim/files/vimrc
+++ b/editors/vim/files/vimrc
@@ -1,3 +1,9 @@
+" FreeBSD provides this file for three reasons:
+" 1. Some of the default settings are not great (e.g. backspace)
+" 2. FreeBSD requires some special handling (e.g. g:is_posix)
+" 3. vim-tiny doesn't ship with $VIMRUNTIME/defaults.vim, so any
+" settings that vim-tiny gets must appear in this file
+
" defaults.vim will override this file. Sourcing it here and
" setting the skip flag prevents clobbering settings
source $VIMRUNTIME/defaults.vim
@@ -19,7 +25,7 @@ set ruler " Show cursor position
set ttyfast " Redraw faster for smoother scrolling
set wildmenu " Show menu for tab completion in command mode
-try
+try
syntax on " Enable syntax highlighting
catch | endtry " vim-tiny is installed without the syntax files