From db8049f903861c89cfc823ac459a4f52e267a266 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 3f5271076f..6de61ef821 100644 --- a/vimrc +++ b/vimrc @@ -176,6 +176,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