From ae0f63cbbb57112ae8084d0a2b639d2ec7f8793b Mon Sep 17 00:00:00 2001 From: James MacMillan Date: Tue, 24 Aug 2021 11:24:53 -0400 Subject: [PATCH] Fix for MacOS issue with diffopts=internal Stock vim on Catalina (and, apparently, Big Sur) does not support diffopt=internal even though the default options include internal. Thus :set diffopt+=vertical is equivalent to :set diffopt=internal,filler,vertical which is an error because internal is not supported. One solution is to modify your .vimrc as follows: if &diff set diffopt-=internal set diffopt+=vertical endif The issue (and fix) is described on these websites: https://github.com/thoughtbot/dotfiles/issues/655 https://www.micahsmith.com/blog/2019/11/fixing-vim-invalid-argument-diffopt-iwhite/ --- vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimrc b/vimrc index 8f9d078848..092320919e 100644 --- a/vimrc +++ b/vimrc @@ -173,6 +173,10 @@ set spellfile=$HOME/.vim-spell-en.utf-8.add " Autocomplete with dictionary words when spell check is on set complete+=kspell +" Fix for MacOS issue described here: +" https://github.com/thoughtbot/dotfiles/issues/655 +set diffopt-=internal + " Always use vertical diffs set diffopt+=vertical