git: 8380febbf306 - main - editors/vim: Add some explanatory comments to the vimrc

From: Adam Weinberger <adamw_at_FreeBSD.org>
Date: Mon, 01 Aug 2022 13:47:59 UTC
The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8380febbf30620bc0833a9eac823b54f4799ad49

commit 8380febbf30620bc0833a9eac823b54f4799ad49
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2022-08-01 13:44:44 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2022-08-01 13:47:55 +0000

    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
---
 editors/vim/files/vimrc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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