--- Hello giters! Hope you are well! I made this little patch to support nvim as a merge tool. What do you think? Best regards, Pudinha <3 mergetools/nvimdiff | 1 + mergetools/nvimdiff2 | 1 + mergetools/nvimdiff3 | 1 + mergetools/vimdiff | 9 ++++++--- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 mergetools/nvimdiff create mode 100644 mergetools/nvimdiff2 create mode 100644 mergetools/nvimdiff3 diff --git a/mergetools/nvimdiff b/mergetools/nvimdiff new file mode 100644 index 0000000000..04a5bb0ea8 --- /dev/null +++ b/mergetools/nvimdiff @@ -0,0 +1 @@ +. "$MERGE_TOOLS_DIR/vimdiff" diff --git a/mergetools/nvimdiff2 b/mergetools/nvimdiff2 new file mode 100644 index 0000000000..04a5bb0ea8 --- /dev/null +++ b/mergetools/nvimdiff2 @@ -0,0 +1 @@ +. "$MERGE_TOOLS_DIR/vimdiff" diff --git a/mergetools/nvimdiff3 b/mergetools/nvimdiff3 new file mode 100644 index 0000000000..04a5bb0ea8 --- /dev/null +++ b/mergetools/nvimdiff3 @@ -0,0 +1 @@ +. "$MERGE_TOOLS_DIR/vimdiff" diff --git a/mergetools/vimdiff b/mergetools/vimdiff index 10d86f3e19..be559062ee 100644 --- a/mergetools/vimdiff +++ b/mergetools/vimdiff @@ -5,7 +5,7 @@ diff_cmd () { merge_cmd () { case "$1" in - gvimdiff|vimdiff) + nvimdiff|gvimdiff|vimdiff) if $base_present then "$merge_tool_path" -f -d -c '4wincmd w | wincmd J' \ @@ -15,11 +15,11 @@ merge_cmd () { "$LOCAL" "$MERGED" "$REMOTE" fi ;; - gvimdiff2|vimdiff2) + nvimdiff2|gvimdiff2|vimdiff2) "$merge_tool_path" -f -d -c 'wincmd l' \ "$LOCAL" "$MERGED" "$REMOTE" ;; - gvimdiff3|vimdiff3) + nvimdiff3|gvimdiff3|vimdiff3) if $base_present then "$merge_tool_path" -f -d -c 'hid | hid | hid' \ @@ -34,6 +34,9 @@ merge_cmd () { translate_merge_tool_path() { case "$1" in + nvimdiff|nvimdiff2|nvimdiff3) + echo nvim + ;; gvimdiff|gvimdiff2|gvimdiff3) echo gvim ;; -- 2.27.0