From d691030b0a8b354be0ea158990b3994284502c33 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 8 Nov 2019 00:29:46 +0100 Subject: code-review-difftool: Turn off swap files When the files being opened with `difftool` are already open in a Vim instance, a 'swap file already exists' confirmation warning is displayed for each file. Bypass the warning by not saving swap files (using the -n command line option). --- code-review-difftool | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code-review-difftool b/code-review-difftool index 9cbf631..87a332a 100755 --- a/code-review-difftool +++ b/code-review-difftool @@ -27,4 +27,7 @@ review_base="$(get_merge_base)" shopt -s extglob review_base_without_dots="${review_base%%?(..|...)}" -vim -c "tabdo Gdiff $review_base_without_dots" -p $(code-review changed-files) +vim \ + -n \ + -c "tabdo Gdiff $review_base_without_dots" \ + -p $(code-review changed-files) -- cgit v1.2.3