103 lines · 4.5 KB · TOML
RawDownload
[merge-tools.diffedit3]program="diffedit3"# 17376 is a verified random number, as in https://xkcd.com/221/ :). I am trying# to avoid 8000 or 8080 in case those, more commonly used, port numbers are used# for something else.## We use a random port as a fallback if all 5 of the preferred port numbers are# busy.edit-args = ["$left", "$right", "$output", "--port", "17376-17380", "--port", "0"]# Not the best diff viewer, but functional. It's possible to hide the 3rd pane in the UI.diff-args = ["$left", "$right", "--port", "17376-17380", "--port", "0"] [merge-tools.diffedit3-ssh]program="diffedit3"# See comments for `diffedit3` above.## Unlike `diffedit3`, `diffedit3-ssh` does NOT use a random port as a fallback# since we recommend that the user configure SSH to forward these 5 portsedit-args = ["$left", "$right", "$output", "--port", "17376-17380", "--no-browser"]diff-args = ["$left", "$right", "--port", "17376-17380", "--no-browser"] [merge-tools.difft]diff-args = ["--color=always", "--width=$width", "$left", "$right"]edit-args = []  # Non-interactive diff formatter [merge-tools.kdiff3]# --merge to open output pane, CreateBakFiles=0 to not include backup files in commitedit-args = ["--merge", "--cs", "CreateBakFiles=0", "$left", "$right"]merge-args = ["$base", "$left", "$right", "-o", "$output", "--auto"] [merge-tools.meld]edit-args = ["$left", "$right"]merge-args = ["$left", "$base", "$right", "-o", "$output", "--auto-merge"] [merge-tools.meld-3]program="meld"diff-args = ["$left", "$right"]  # Same as the default value# If using this as a template, note that `$output` is repeated twice belowedit-args = ["$left", "$output", "$right", "-o", "$output"] [merge-tools.mergiraf]# Currently, the --fast flag often gives the best results because the structural merge# algorithm doesn't always maintain comments and spacing in the merge output# (even parts without conflicts), but you can remove it if you want to use a full structural merge.program = "mergiraf"merge-args = ["merge", "$base", "$left", "$right", "-o", "$output", "-l", "$marker_length", "-p", "$path", "--fast"]merge-conflict-exit-codes = [1]# Non-interactive merge tooledit-args = []diff-args = [] [merge-tools.smerge]merge-args = ["mergetool", "$base", "$left", "$right", "-o", "$output"]conflict-marker-style = "git"# Does not support diff editing as of this writing. See also# https://github.com/sublimehq/sublime_merge/issues/1939# https://www.sublimemerge.com/docs/command_lineedit-args = []diff-args = [] [merge-tools.vimdiff]program = "vim"# `-d` enables diff mode. `-f` makes vim run in foreground even if it starts a GUI.# The other options make sure that only the output file can be modified.merge-args = ["-f", "-d", "$output", "-M", "$left", "$base", "$right",              "-c", "wincmd J", "-c", "set modifiable", "-c", "set write",              "-c", "/<<<<<</+2"]merge-tool-edits-conflict-markers = true# Using vimdiff as a diff editor is possible but not recommended. For# instructions on configuring the DirDiff Vim plugin for a better experience,# see https://gist.github.com/ilyagr/5d6339fb7dac5e7ab06fe1561ec62d45edit-args = ["-f", "-d", "$left", "$right"]diff-args = []  # Corrupts terminal state, non-functional # if you change the settings for vscode, please do the same for vscodium[merge-tools.vscode]program = "code"merge-args = ["--wait", "--merge", "$left", "$right", "$base", "$output"]# VS Code reads the output file and behaves better if it's prepopulated with conflict# markers. Unfortunately, it does not seem to be able to output conflict markers when# the user only resolves some of the conflicts.merge-tool-edits-conflict-markers = true# VS Code prefers Git-style conflict markersconflict-marker-style = "git"# Not recommended, but functional. Without `--wait`, the behavior may be more# convenient, but is also more confusing and brittle (all files get deleted).# TODO: We could consider a "file-by-file-keep-files" invocation mode to make it# work better.diff-args=["--diff", "$left", "$right", "--wait"]diff-invocation-mode="file-by-file"# `code --diff` does not support dir-diffedit-args = [] # free/libre distribution of vscode, functionally more or less the same[merge-tools.vscodium]program = "codium"merge-args = ["--wait", "--merge", "$left", "$right", "$base", "$output"]# See notes for vscode abovemerge-tool-edits-conflict-markers = trueconflict-marker-style = "git"diff-args=["--diff", "$left", "$right", "--wait"]diff-invocation-mode="file-by-file"edit-args = []