From d748e11b586c96c705455ff43fe987ca9f7ae621 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 ce0d44eac7..dd0a08e75c 100644 --- a/vimrc +++ b/vimrc @@ -147,6 +147,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