Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Fix for MacOS issue with diffopts=internal
Browse files Browse the repository at this point in the history
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:
thoughtbot#655
https://www.micahsmith.com/blog/2019/11/fixing-vim-invalid-argument-diffopt-iwhite/
  • Loading branch information
jamesiain authored and James MacMillan committed Jan 10, 2023
1 parent 729cc89 commit ae0f63c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ae0f63c

Please sign in to comment.